summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fgetln.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-11-02 11:08:07 +0000
committerphk <phk@FreeBSD.org>2002-11-02 11:08:07 +0000
commit982f8bb0ad4054cc55caae06abff4c140e903c35 (patch)
treeb5c88c81d164e654b203f5f892c9ea2622968999 /lib/libc/stdio/fgetln.c
parent01e8832a6131a9bdfdcb55753fedf1640861dbfb (diff)
downloadFreeBSD-src-982f8bb0ad4054cc55caae06abff4c140e903c35.zip
FreeBSD-src-982f8bb0ad4054cc55caae06abff4c140e903c35.tar.gz
malloc(9) with M_NOWAIT seems to return NULL a lot more than I would have
expected under -current. This is a problem for GEOM because the up/down threads cannot sleep waiting for memory to become free. The reason they cannot sleep is that paging things out to disk may be the only way we can clear up some RAM. Nice catch-22 there. Implement a rudimentary ENOMEM recovery strategy: If an I/O request fails with an error code of ENOMEM, schedule it for a retry, and tell the down-thread to sleep hz/10 to get other parts of the system a chance to free up some memory, in particular the up-path in GEOM. All caches should probably start to monitor malloc(9) failures using the new malloc_last_fail() function, and release when it indicates congestion. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'lib/libc/stdio/fgetln.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud