Danny wrote:
> Feb 20 12:51:38 dsc_proto_1 kernel: __alloc_pages: 0-order allocation
> failed.
For those seeing __alloc_pages failing, can you please try this patch?
With recent code changes, writepage() is used for flushing dirty pages,
and this typically happens under memory pressure. So, doing anything
expensive to allocate memory under these conditions is bad.
cheers,
ananth.
--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
----------------------------------------------------------------------------- /usr/tmp/TmpDir.25971-0/linux/fs/pagebuf/page_buf_io.c_1.53 Wed Feb 21
13:50:08 2001
+++ linux/fs/pagebuf/page_buf_io.c Wed Feb 21 13:49:03 2001
@@ -261,7 +261,7 @@
* since this can be in kswapd's path ...
*/
cpages = kmalloc(CLUSTER_PAGE_LIST_SIZE * sizeof(struct page *),
- GFP_BUFFER);
+ GFP_ATOMIC);
spin_lock(&pagecache_lock);
_pagebuf_flush(ip, &ip->i_mapping->clean_pages, ioff, cpages);
@@ -1084,7 +1084,7 @@
current->flags |= PF_MEMALLOC;
cpages = kmalloc(CLUSTER_PAGE_LIST_SIZE * sizeof(struct page *),
- GFP_BUFFER);
+ GFP_ATOMIC);
do_write_full_page++;
|