| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fraction of the wakeups and sleeps involved here actually grab that
lock. The remainder, on the other hand, always have the fpageq_lock
locked.
So, make this locking correct by switching the other users over to
fpageq_lock, too.
This would probably be better off being a semaphore, but for now at
least it's correct.
"ok, unless you want to implement semaphores" art@
|
|
|
|
|
|
|
|
| |
Fix up the one case of lock recursion (which blatantly ignored the
comment right above it saying that we don't need to lock). The rest of
the lock usage has been checked and appears to be correct.
ok ariane@.
|
|
|
|
|
|
|
| |
the simple lock with a real lock - a IPL_BIO mutex. While i'm here, make
the sleeping condition one hell of a lot simpler in the aio daemon.
some ideas from and ok art@.
|
|
|
|
|
|
|
| |
K&R function declarations, so switch them all over to ansi-style, in
accordance with the prophesy.
"go for it" art@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. When checking if the pagedaemon should be awakened and to see how
much work it should do, consider the buffer cache deficit
(how much pages the buffer cache can eat max vs. how much it has
now) as pages that are not free. They are actually still usable by
the allocator, but the presure on the pagedaemon is increased when
we starting to chew into the memory that the buffer cache wants to
use.
2. Remove the stupid 512kB limit of how much memory should be our
free target. That maybe made sense on 68k, but on modern systems
512k is just a joke. Keep it at 3% of physical memory just like
it was meant to be.
3. When doing allocations for the pagedaemon, always let it use the
reserve. the whole UVM_OBJ_IS_KERN_OBJECT is silly and doesn't
work in most cases anyway. We still don't have a reserve for
the pagedaemon in the km_page allocator, but this seems to help
enough. (yes, there are still bad cases in that code and the comment
is only half-true, the whole section needs a massage, but that will
happen later, this diff only touches pagedaemon parts)
Testing by many, prodded by theo.
|
|
|
|
|
|
|
| |
macros that just expand into the mutex functions
to keep the abstraction, do assorted cleanup.
ok miod@,art@
|
|
|
|
| |
ckuethe@ for a while. Okay beck@, "it is good timing" deraadt@.
|
|
|
|
|
|
|
|
|
|
|
|
| |
to separate locking, on most modern machines this is not enough
since operations on short types touch other short types that share the
same word in memory.
Merge pg_flags and pqflags again and now use atomic operations to change
the flags. Also bump wire_count to an int and pg_version might go
int as well, just for alignment.
tested by many, many. ok miod@
|
|
|
|
|
|
|
|
|
|
| |
to "pg_flags" and "pg_version", so that they are a bit easier to work with.
Whoever uses generic names like this for a popular struct obviously doesn't
read much code.
Most architectures compile and there are no functionality changes.
deraadt@ ok ("if something fails to compile, we fix that by hand")
|
| |
|
|
|
|
|
| |
us did not see it or get a chance to test it before it was commited. It
broke cvs, in the ami driver, making it not succeed at seeing it's devices.
|
|
|
|
|
|
| |
this results in lesse kva waste due to static preallocation of those
for every phys page and also every swap page.
tested by beck krw miod
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. drain hooks and lists of allocators make the code complicated
2. the only hooks in the system are the mbuf reclaim routines
3. if reclaim is actually able to put a meaningful amount of memory back
in the system, i think something else is dicked up. ie, if reclaiming
your ip fragment buffers makes the difference thrashing swap and not,
your system is in a load of trouble.
4. it's a scary amount of code running with very weird spl requirements
and i'd say it's pretty much totally untested. raise your hand if your
router is running at the edge of swap.
5. the reclaim stuff goes back to when mbufs lived in a tiny vm_map and
you could run out of va. that's very unlikely (like impossible) now.
ok/tested pedro krw sturm
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This unbreaks m68k m88k sparc and perhaps others, which eventually froze
when hitting swap.
Tested by various people on various platforms.
ok art@
|
|
|
|
|
|
|
|
|
| |
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.
We apologise for the inconvenience.
|
|
|
|
| |
Contains also support for page coloring.
|
|
|
|
|
| |
This time we're getting rid of KERN_* and VM_PAGER_* error codes and
use errnos instead.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
UBC, but prerequsites for it.
- Create a daemon that processes async I/O (swap and paging in the future)
requests that need processing in process context and that were processed
in the pagedaemon before.
- Convert some ugly ifdef DIAGNOSTIC code to less intrusive KASSERTs.
- misc other cleanups.
|
|
|
|
|
|
| |
- Use malloc/free instead of MALLOC/FREE for variable sized allocations.
- Move the memory inheritance code to sys/mman.h and rename from VM_* to MAP_*
- various cleanups and simplifications.
|
|
|
|
|
|
|
| |
The only thing left in vm/ are just dumb wrappers.
vm/vm.h includes uvm/uvm_extern.h
vm/pmap.h includes uvm/uvm_pmap.h
vm/vm_page.h includes uvm/uvm_page.h
|
| |
|
| |
|
|
|
|
| |
Including support for zeroing pages in the idle loop (not enabled yet).
|
| |
|
|
|
|
|
| |
The archs that didn't have a proper PMAP_NEW now have a dummy implementation
with wrappers around the old functions.
|
| |
|
|
|
|
|
| |
wrapper, so this removes a dependence on the old VM system. From NetBSD.
art@ ok
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- Introduce a new type of map that are interrupt safe and never allow faults
in them. mb_map and kmem_map are made intrsafe.
- Add "access protection" to uvm_vslock (to be passed down to uvm_fault and
later to pmap_enter).
- madvise(2) now works.
- various cleanups.
|
|
|
|
|
|
|
|
|
|
| |
via sysctl.
Pages are encrypted with the Blowfish encryption algorithm, the key
is initialized randomly on first swap out, ensuring that entropy has
accumulated in the kernel randomness pool. Eventually, swap encryption
will be decided on a process by process basis, e.g. a process that reads from
a cryptographic filesystem will enable swap encrypt for its pages. okay
art@ and deraadt@.
|
|
|
|
|
| |
Mostly cleanups, but also a few improvements to pagedaemon for better
handling of low memory and/or low swap conditions.
|
| |
|
|
|