lkml.org 
[lkml]   [1997]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bug in write request flushing !!!

On Tue, 1 Jul 1997, Dr. Werner Fink wrote:

Just my opinion on this change:

> - if (!grow_buffers(GFP_ATOMIC, size))
> + if (grow_buffers(GFP_ATOMIC, size))
> + needed -= PAGE_SIZE;
> + else
> wakeup_bdflush(1);
> - needed -= PAGE_SIZE;
> goto repeat;


If grow_buffers(GFP_ATOMIC, size) fails, that means that we have'nt been
able to allocate a page and buffer headers, and sure that we are very
low in memory.
Since "bdflush" seems not to wait for IO completion, I'm not sure it is
clever to try again to find some candidates if some buffer has been
freed yet.
I would prefer the following code.

else {
wakeup_bdflush(1);
if (free_list[size])/* Better to give up than to die stupidly */
return;
}

Gerard.


\
 
 \ /
  Last update: 2005-03-22 13:39    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site