Commit Graph

200148 Commits

Author SHA1 Message Date
wiz
a422d26790 Spelling, sort sections. 2011-04-20 08:20:16 +00:00
jym
f5c98195c2 So, hi again, balloon(4). Merge with the current version:
- driver attaches to xenbus(4) (no compile time option anymore)
- max reservation hypercall is fixed
- sysctl(7) entries are now in KiB (like Xentools) rather than in number
of pages
- some more explanations.
2011-04-20 00:21:34 +00:00
jym
53935bb7a5 Sigh, removing balloon(4) there was already one living under x86.
Not marking the entry in set lists as obsolete, the man page stayed
in there for approx. 5min.

(apologies for the noise)
2011-04-20 00:04:54 +00:00
jym
ab22fdaedf Please welcome balloon(4), the Xen memory balloon man page. 2011-04-19 23:54:38 +00:00
martin
fd21e1d8bf Manually craft a (default) termios description instead of trying to fetch
one from stdin - ATF tests should not rely on stdin being a terminal.
2011-04-19 20:13:55 +00:00
martin
8fc4e7259f Make the test case independend of stdin being a terminal 2011-04-19 20:07:53 +00:00
drochner
ab862eb3da fix some labels for ipcomp counters which didn't make sense at all 2011-04-19 18:34:39 +00:00
phx
161f7a47d9 It is probably better to flash the power LED after power-off on a DSM-G600,
to make the user aware that he needs to remove power manually.
2011-04-19 18:16:03 +00:00
phx
e122f9b9e1 Make it compile when no kernel symbols and no debugger is configured. 2011-04-19 18:06:19 +00:00
phx
e8dfac90be Some DSM-G600 use a Acard ATP865A instead of ATP865. Added its product id. 2011-04-19 17:49:38 +00:00
phx
53ec9ace10 Added a detailed description of altboot command line and boot arguments. 2011-04-19 14:12:54 +00:00
manu
7a675e4eab In node_lookup() ops, pcn->pcn_nameiop contains a NAMEI_* constant, not
PUFFSLOOKUP_*
2011-04-19 10:35:24 +00:00
martin
9761dd743b Add MAP_PRIVATE to mmap() flags where missing. 2011-04-19 10:21:51 +00:00
martin
ffaba5de79 Relax an assertion 2011-04-19 07:12:59 +00:00
joerg
6a4bfecd54 Avoid C99 features. 2011-04-18 23:22:42 +00:00
joerg
34bdd27889 Add support for --null-data. Change -Z to behave like GNU grep's -Z. 2011-04-18 22:46:48 +00:00
buhrow
9605db34e0 Fixes for kern/40018.
Our driver initializes the Broadcom hardware to peform a tcp and udp
checksum on only the payload of the tcp or udp packet, rather than the
entire packet.  The FreeBSD, OpenBSD  and Linux drivers instruct the hardware to compute
the checksum for the entire packet.  I believe the bug is that some revisions
of the BCM hardware, under certain circumstances, revert to doing the
complete checksum calculation, as the FreeBSD, OpenBSD  and Linux drivers
request, while things are running. As
a result, when we pull the computed checksum from the hardware and pass it
up to the upper layers, we assume the checksum is the more minimal
one, and the upper layers perform the appropriate checks, which, when this
happens, cause the packet to be rejected because the resultant checksum is
decidedly incorrect.
	This patch changes the driver to instruct the hardware to perform the
checksum over the entire packet, just as the FreeBSD, OpenBSD  and
Linux drivers do, and to notify the upper layers appropriately.

This patch appears to work on all revisions of the hardware that have been
tested.  (See the list in the bug report.)

this patch is approved by tls.
2011-04-18 22:05:39 +00:00
joerg
ff9dcf4380 Redo context printing so that adjourning contexts don't print the
separator, following GNU grep's behavior in this regard.
2011-04-18 17:18:03 +00:00
drochner
1e1bb256ba according to C99/POSIX, nextafter(x,y) should return y if x==y, from
Henning Petersen per PR lib/44875
2011-04-18 15:59:09 +00:00
rmind
23e8e926b4 G/C unused speedup_syncer() mechanism and thus simplify some code.
Update some comments to reflect the reality.  No actual changes to
the (used) syncer logic.

OK ad@
2011-04-18 15:53:04 +00:00
christos
305cf7b18b PR/44876: Aleksey Cheusov: awk: incorrect return value of function srand()
Make it return the value of the previous random seed as the standard mandates.
2011-04-18 15:23:28 +00:00
wiz
441cf87402 less-443 is out. 2011-04-18 08:36:14 +00:00
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