Commit Graph

200176 Commits

Author SHA1 Message Date
hannken
21d54ad389 Preallocate all cylinder group blocks so we no longer redo ~50% of
the cylinder groups while the file system is suspended.
This was removed in error with Rev 1.16.

From Manuel Bouyer <bouyer@netbsd.org> via tech-kern.
2011-04-18 07:36:13 +00:00
joerg
4bb7e7be1d Use the more portable getline. 2011-04-18 03:48:23 +00:00
joerg
4c78e1ea83 Fix memory leaks. 2011-04-18 03:47:40 +00:00
joerg
f7d22212e7 Include nbtool_config.h for tool builds. 2011-04-18 03:27:40 +00:00
rmind
403e4e6cb1 balloon_xenbus_attach: use KM_SLEEP for allocation.
Note: please do not use KM_NOSLEEP.
2011-04-18 03:04:31 +00:00
joerg
cad1e2593b Fix --sysroot usage. 2011-04-18 02:16:55 +00:00
rmind
a853c5ba8e Replace few simple_lock and ltsleep/wakeup uses with mutex(9) and condvar(9).
Note to all: please replace old primitives in your code! Thanks.
2011-04-18 01:47:28 +00:00
jym
6b3956d6d5 Large rewrite of the balloon driver. This one:
- turns balloon into a driver that attaches to xenbus(4). This allows to
disable the functionality either at compile time or boot time via
userconf(4). Driver can implement detach or pmf(9) hooks if deemed
necessary.

- keeps Cherry's locking model, but simplify it a bit. There is now
only one target value serialized inside balloon, we do not feedback
alternative value to Xenstore (clients are not expected to see its value
evolve behind their back, and can't do much about that either)

- implements min threshold; this is an admin-settable value that tells
driver to "not balloon below this threshold." This can be used by domain
to keep memory reservations, useful if activity is expected in the near
future.

- in addition to min threshold, the driver implements internally a
safeguard value (uvmexp.freemin + 1MiB), so that admin cannot
inadvertently set min to a very low value forcing domain into heavy
memory pressure and swapping.

- create the sysctl(8) kern.xen.balloon tree. 4 nodes are actually present
(values are in KiB):
   - min: (rw) an admin-settable value that prevents ballooning below this
          mark
   - max: (ro) the maximum size for reservation, as set by xm(1) mem-max.
   - current: (ro) the current reservation for domain.
   - target:  (rw) the targetted reservation for domain.

- fix a few limitations here and there, most notably the max_reservation
hypercall, and KiB vs pages representations at interfaces.

The driver is still turned off by default. Enabling it would need more
approval, especially from bouyer@, cherry@ and cegger@.

FWIW: tested it two days long, from amd64 dom0 (with dom0 ballooning
enabled for xend), and bunch of domUs. Did not notice anything suspicious.

XXX it still has one big limitation: it cannot hotplug memory pages in
uvm(9) if they were not present beforehand. Example: ballooning above
physmem will give more pages to domain but it won't use it to serve
allocations, unless we teach uvm(9) how to handle the extra pages.
2011-04-18 01:36:24 +00:00
dholland
66bcf26abf Simplify logic: at the bottom of the loop, instead of checking if we
should continue and if not breaking unconditionally, check if we
should break and if not use the bottom of the loop to continue to the
next iteration.
2011-04-18 00:47:24 +00:00
dholland
34cecc956d Goto considered harmful: now the "goto alldone" can be dropped by
reversing the sense of the associated test and using the big block I
moved a couple versions back (and didn't reindent on purpose) as the
body of the if statement.

There are now no gotos in namei_oneroot, only normal loop logic.
2011-04-18 00:47:04 +00:00
dholland
d5da8807ec The "goto alldone" from a couple patches back (inside the loop) can
now be changed to a loop break and another null test and goto outside
the loop. In neither of the other two cases for exiting the loop can
foundobj be null.
2011-04-18 00:46:39 +00:00
dholland
4e686966b9 Goto considered harmful: "goto terminal" can now just be "break". 2011-04-18 00:46:14 +00:00
dholland
58f787872f Move the big chunk of code at "terminal:" outside the loop; since it
has an unconditional loop break at the end this can be done safely,
now that the other loop break has been patched out.

Add a spurious set of braces to preserve the indent for the moment.
2011-04-18 00:45:53 +00:00
dholland
6a68e5d4c1 Goto still harmful, but use "goto alldone" in place of a loop break
for now anyway.
2011-04-18 00:45:29 +00:00
dholland
43ee276311 Goto considered harmful; remove dirloop: in favor of using a loop
continue.

This runs the "are we mounted?" test on every directory instead of
only sometimes; however, it's not exactly an expensive test (null
pointer check) and the prior logic wasn't exactly sensible -- it
checked at the beginning and after following a symlink but, for some
reason, not after crossing a mount point.
2011-04-18 00:45:07 +00:00
dholland
82f660e639 Regen for ISSYMLINK removal. 2011-04-18 00:43:56 +00:00
dholland
0830aae894 ISSYMLINK is now only referenced inside vfs_lookup.c, and not needed
there, so get rid of it.
2011-04-18 00:40:53 +00:00
dholland
7cb501d652 Back in -r1.60 of nfs_serv.c (a long time ago) VOP_MKNOD was changed
so nfsd no longer needed to do a lookup() call immediately afterwards
to retrieve the newly created object.

Since that change there has been no way for ISSYMLINK to be set upon
return from VOP_MKNOD (or before the call to VOP_MKNOD either) so
remove the test for it and associated block of dead code.

(I do not understand how this code was reachable before then either.
The logic in question is only reached if no object by that name
existed, and there's no reasonable way that a successful call to
VOP_MKNOD should ever create a symlink. The code appears to come from
4.4lite; maybe they had locking bugs?)
2011-04-18 00:38:33 +00:00
rmind
7e2ef7ad8f Replace malloc with kmem, and remove M_SUBPROC. 2011-04-18 00:26:11 +00:00
jym
f23b41b209 Remove remnants from the past when Xen 2 was still alive. 2011-04-17 23:54:05 +00:00
christos
4957358ed5 Correct check for snprintf() overflow via Maksymilian Arciemowicz from FreeBSD.
(the bt one was ok, but set errno and make it the same for consistency).
[to be pulled up]
2011-04-17 23:12:38 +00:00
christos
28e5fe5363 Recognize --sysroot but don't document it or do anything about it for now. 2011-04-17 22:35:22 +00:00
rmind
1acca05347 ksem_free: remove wrong assert. 2011-04-17 20:37:43 +00:00
phx
ee119a47a6 Suppressing the ACK after the last byte read must not depend on
I2C_OP_STOP_P(), but all read-transfers have to be finished that way.
Otherwise a chip might hang after a read-operation without stop.

Removed sc_start from the softc structure, which is unused.
2011-04-17 15:14:59 +00:00
christos
afb74ce0eb Revert previous, breaks builds completely (cd /usr/src/bin/test && make clean &&
make)
2011-04-17 15:03:37 +00:00
phx
a492cb9f47 Do not print "M41ST84 Real-time Clock/NVRAM", but "M41T8x Real-time Clock"
when STRTC_NO_USERRAM is defined. This driver should work for all M41T8x
compatible chips (tested on my DSM-G600 with M41T80).
2011-04-17 14:58:26 +00:00
phx
847aca0706 DSM-G600: Turn off all LEDs when shutting down, to indicate the device
can be switched off.
2011-04-17 14:05:59 +00:00
martin
4b3298a1fe Invert the chroot/tcpdump/etc test and make it remove the (not needed
anymore) directory.
2011-04-17 13:16:59 +00:00
phx
5892c210fd DSM-G600 has a 33.000 MHz oscillator on board. 2011-04-17 13:09:30 +00:00
martin
470f713611 Get rid of var/chroot/tcpdump/etc 2011-04-17 13:07:18 +00:00
martin
36415c47cb Get rid of /var/chroot/tcpdump/etc 2011-04-17 13:04:50 +00:00
tron
7d762fda62 Don't use "--sysroot=/" for host builds as "nbhost-mkdep" doesn't
understand that option. This should unbreak tool builds.
2011-04-17 12:54:22 +00:00
tron
0f152b1dd8 Set "HOSTLIB" before including "bsd.own.mk" to get the destination
directory checks to work properly.
2011-04-17 12:52:26 +00:00
martin
1f1f76a438 Add an "exitstring" to the utility menu, so translations can provide
proper strings (like: "back to main menu"). For most translations set
to plain "Exit" (like it used to be) for now - natives, please fix!
2011-04-17 12:33:42 +00:00
martin
dd3f377a8d On install CDs: make ^C and ^Z work (mostly) as they used to do on
crunched/ramdisk install media again.
Fixes the remaining parts of PR 44738.
2011-04-17 12:18:19 +00:00
martin
518b4814dd Hint from dsl: make sure to have the /etc/protocols file already open
before doing a chroot() if run as root. Easily done by a setprotoent(1)
call. This is a better (less intrusive) fix for PR bin/44721.
2011-04-17 11:45:40 +00:00
mrg
99e13dd624 catch up with heimdal update. 2011-04-17 10:06:49 +00:00
mrg
648bc71c1a apply some _KERNEL_OPT. 2011-04-17 09:50:33 +00:00
mrg
19625811ee prepare for evbppc modules, and allow overriding the ${MACHINE} for
installed modules.
2011-04-17 09:47:40 +00:00
mrg
9163f54855 various updates to deal with heimdal update. 2011-04-17 09:01:57 +00:00
jruoho
2fa0f9fccc Few simple tests for getgroups(2). 2011-04-17 06:26:02 +00:00
jruoho
38b0bf3bbd Test nice(3) also with threads. 2011-04-17 06:18:23 +00:00
mrg
2101d54084 add a "module_machine", that defaults to machine.
allows MD code to override the default subdir for modules.
2011-04-17 05:16:28 +00:00
mrg
df0710a4ad catch up with s/MAKEDIROBJPREFIX/MAKEOBJDIR/ changes in comments. 2011-04-17 01:29:06 +00:00
mlelstv
d3b6e4494f Use MI routine banner() to print memory size. Also fixes output for systems
with 2GB RAM.
2011-04-17 00:37:49 +00:00
mrg
3776a6678e it's spelled CPPFLAGS not CPPFLAGGS. 2011-04-17 00:05:36 +00:00
christos
5b8e5cb4eb Fix markup 2011-04-16 23:58:01 +00:00
christos
62ee277445 Need --sysroot=/ otherwise ld does not find crt0.o and friends. 2011-04-16 22:45:23 +00:00
christos
ba32f653b8 add {man,cat,html}8/x86 2011-04-16 22:00:34 +00:00
christos
ccbde8e579 add cat8 and html8 2011-04-16 21:58:31 +00:00