by RAIDframe. Convert all other RAIDframe global pools to use pools
defined within this new structure.
- Introduce rf_pool_init(), used for initializing a single pool in
RAIDframe. Teach each of the configuration routines to use
rf_pool_init().
- Cleanup a few pool-related comments.
- Cleanup revent initialization and #defines.
- Add a missing pool_destroy() for the reconbuffer pool.
(Saves another 1K off of an i386 GENERIC kernel, and makes
stuff a lot more readable)
by RAIDframe. Convert all other RAIDframe global pools to use pools
defined within this new structure.
- Introduce rf_pool_init(), used for initializing a single pool in
RAIDframe. Teach each of the configuration routines to use
rf_pool_init().
- Cleanup a few pool-related comments.
- Cleanup revent initialization and #defines.
- Add a missing pool_destroy() for the reconbuffer pool.
(Saves another 1K off of an i386 GENERIC kernel, and makes
stuff a lot more readable)
rf_AllocBuffer() is available, so use it to get buffer space instead
of the previous RF_Malloc() bits. Saves a few bytes, but more
importantly makes the code much more readable.
case, we tear down the node-specific storage as if there were no more open
users. As vclean() will VT_NON the vnode before anyone else will get access
to the vnode, this is our last chance.
Fixes memory leak in revoke(2) path noticed by tedu at openbsd dot org.
- introduce RF_MIN_*'s, as necessary. These will indicate the
low-water mark for pools as well as the pool_prime() value.
- add pool_setlowat() for the critical pools.
- pool_prime() and pool_setlowat() the raidframe_cbufpool.
- re-order some pool_prime()'s and pool_sethiwat()'s for clarity.
-The MachFPTrap did generate pre-siginfo arguments to trapsignal(),
leading to an immediate crash.
Put the siginfo generation into a separate .c file for simplicity.
-The exception bits in MIPS_FPU_CSR didn't get cleared, leading to
trouble later ("kernel used FPU" on pmax).
XXX This should probably be done for the "unimplemented fpu instruction"
case as well, but I don't know how to test this. Or, even better -
centralize the CSR clearing before the branch in MachFPTrap.
be updated. (This is needed to be compatible with how pre-SIGINFO signals
operated. If you siglongjmp out of a signal handler, the SS_ONSTACK state
needs to be cleared. This commit restores that functionality).
- RAS_DECL(name): declare the RAS "name"
- RAS_START(name): mark the start of the RAS "name"
- RAS_END(name): mark the end of the RAS "name"
- RAS_ADDR(name): compute the starting address of the RAS "name"
- RAS_SIZE(name): compute the size of the RAS "name"
RAS_START() and RAS_END() have implicit instruction reordering barriers.
RAS_ADDR() and RAS_SIZE() are to be used when registering a RAS.
-if a new process gets a CPU with an FPU state of another process, it
needs to initialize it to a clean state
(actually, put the "fninit" where it belongs logically)
-initialize mxcsr as well
minor cleanup/optimization
Signal delivery after unmasking some cause is still broken - it doesn't
care about xmm exceptions. For now, set at least si_code to something
positive so that it doesn't look like a user generated asynchonous signal.
This removes 3 more RF_PANIC()'s (but we'll currently still panic if any of these cases occur).
fix up a few printf's.
XXX: still needs more cleanup and testing (and be taught to not panic).
- remove callbackArg2 from RF_CallbackDesc_s -- it is only ever set,
never read.
- now that this is done, all callbacks should only take a single argument,
and we can simplify things further.
- change function signature of rf_LookupRUStatus(). The last argument
is now a pointer to a new PSS, in case one is needed. Rather than
having rf_LookupRUStatus() allocate a new PSS, we pre-allocate one
beforehand, where necessary, just in case.
- change callers of rf_lookupRUStatus() to deal with the new way of
calling rf_lookupRUStatus().
[no improvement or worsening of parity rebuild/initialization performance.]
[For the record: The mcpair mutex is being used to protect mcpair->flag.
mcpair gets allocated before each call to rf_DispatchDAG(), so there is no
other process/thread that could be mucking with it. It is only used to
detect the completion of a given parity unit, and rf_DispatchDAG()
only uses it to setup the callback argument for rf_MCPairWakeupFunc()
which will be called when the IO completes. The code after the call
to rf_DispatchDAG() sits and waits for a 'wakeup' on mcpair->cond
(rf_MCPairWakeupFunc() does that). If mcpair->flag is 0 when
rf_DispatchDAG() completes, then rf_MCPairWakeupFunc() hasn't been
called yet (the IO hasn't completed). If it is 1, then the IO is
already done, and we continue on our merry way without sleeping.
Thus, we don't need to hold any lock on mcpair while calling
rf_DispatchDAG().]
the drive. This fixes (or rather, works around) a timing problem
with WD Raptor drives attached to a Sil3114 SATA controller.
Should fix PR 23808, it fixes the same problem for me.
re-used by another cpu immediately. in that case, lwp_exit2() will
access freed memory. to fix this:
- remove curlwp from p_lwps in exit1() rather than letting lwp_exit2() do so.
- add assertions to ensure freed proc has no lwps.
kern/24329 from me and kern/24574 from Havard Eidnes.
used to short-circuit IPsec processing in other places.
This is enabled only for NetBSD at the moment; in order for it to function
correctly, ipsec_pcbconn() must be called as appropriate.
IPsec processing in other places. The hint has 3 values: MAYBE, YES,
and NO. Hints are initialized to MAYBE, and MAYBE is always used for
unconnected sockets (since the spidx may change for every packet
that is output). For connected sockets, NONE and BYPASS policies cause
the hint to be set to NO, and all other policies to YES.
Also shuffle the PCB cache data structure, turning 3 arrays into a
single array of a struct.
va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).
Improved by comments from enami and christos -- thanks!
Heimdal/krb4/KAME changes already fed back, rest to follow.
Inspired by, but not not based on, OpenBSD.
so that mmap()ped regions remain accessible even when the file descriptor
is closed
g/c smbnode's n_opencount, and have single NOPEN flag instead
fixes PR kern/24516 by Lloyd Parkes
change obtained from FreeBSD, with only minor adjustments
memory. Since we only now ever "return(0)", just return (void)
instead.
Cleanup all uses of rf_ShutdownCreate() to not worry about
it ever failing. Shaves another 600 bytes off of an i386 GENERIC kernel.
from cpu_fork and the proc trampoline. pthreads programs that fork
now work (at least the regress test case does).
Program reported by Florian Stöhr on port-sgimips.
is carried out; particularily, don't touch it if the rename files
due to EXDEV - the 'from' or 'to' vnode may not be on smbfs filesystem
at all in that case
this is the final fix for PR kern/24455 by Milos Urbanek
dynamically allocated variable-sized array (dagArray). Convert code
to use the new linked list stuff instead of the array stuff (the ratio
of one dagList per stripe still applies). The big advantage is in
being able to more efficiently allocate the dagLists on-the-fly, and
not have to know the size(s) of the array beforehand.
free()d memory will be referenced through
usbd_add_dev_event(USB_EVENT_DEVICE_DETACH)->
usbd_fill_deviceinfo()
later.
might need more review, but at least it doesn't crash on
amd64 anymore
from here: set p_execsw to the new thing, and call
the new emulation's syscall_intern()
XXX there are more differences to kern_exec.c, sa/ras
related afaics, this is harmliss for now since
netbsd32 doesn't support multithreaded programs yet --
one day one execve() implementation should be shared
by native and netbsd32 code.
and external interrupt handlers should be completely
unrelated.
For now, just remove the obvious culprit in the nibble/ps2
case to make NTP pps signal capturing work again.
External handlers should be passed to the lower level,
and they should have full power and responsibility if
they are installed, and their lavel should be selected
by the frontend.
Being here, comment out <machine/intr.h> - it is not
used yet, and do some more conmetic cleanup.