tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: crash in pipe_create()
Matthias Drochner <M.Drochner%fz-juelich.de@localhost> writes:
> enami%sm.sony.co.jp@localhost said:
> > pool_cachge_get() returned NULL, doesn't it? It looks previous
> > revsion of pipe_create() returns with error on such case.
>
> I should add that that box could sustain that workload
> with ease a week before. Also see my other backtrace - the
> system was paging and called pool_drain(). This shouldn't
> happen, it has 1G of RAM.
> There is something seriously wrong.
The allocation I mentioned above (the one in pipe_ctor) requests
pageable memory. So, amount of physical memory doesn't matter. (and
the code is committed this week).
Since the newly introduced pipe_ctor returns failure, pool_cache_get()
has to check if the returned value isn't NULL even if it passes
PR_WAIT. Or, since we are allowed to wait, let uvm_km_alloc to wait
also.
Of course, there might be yet another something seriously wrong.
enami.
Index: sys_pipe.c
===================================================================
RCS file: /cvsroot/src/sys/kern/sys_pipe.c,v
retrieving revision 1.106
diff -u -r1.106 sys_pipe.c
--- sys_pipe.c 1 Feb 2009 18:23:04 -0000 1.106
+++ sys_pipe.c 6 Feb 2009 09:18:53 -0000
@@ -199,10 +199,9 @@
memset(pipe, 0, sizeof(struct pipe));
if (arg != NULL) {
/* Preallocate space. */
- va = uvm_km_alloc(kernel_map, PIPE_SIZE, 0, UVM_KMF_PAGEABLE);
- if (va == 0) {
- return ENOMEM;
- }
+ va = uvm_km_alloc(kernel_map, PIPE_SIZE, 0,
+ UVM_KMF_PAGEABLE | UVM_KMF_WAITVA);
+ KASSERT(va != 0);
pipe->pipe_kmem = va;
atomic_add_int(&amountpipekva, PIPE_SIZE);
}
Home |
Main Index |
Thread Index |
Old Index