Re: [RFC][PATCH 00/25]: Propagating GFP_NOFS inside __vmalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 11, 2011 at 9:01 PM, David Rientjes <rientjes@xxxxxxxxxx> wrote:
> On Fri, 11 Mar 2011, Prasad Joshi wrote:
>
>> A filesystem might run into a problem while calling
>> __vmalloc(GFP_NOFS) inside a lock.
>>
>> It is expected than __vmalloc when called with GFP_NOFS should not
>> callback the filesystem code even incase of the increased memory
>> pressure. But the problem is that even if we pass this flag, __vmalloc
>> itself allocates memory with GFP_KERNEL.
>>
>> Using GFP_KERNEL allocations may go into the memory reclaim path and
>> try to free memory by calling file system clear_inode/evict_inode
>> function. Which might lead into deadlock.
>>
>> For further details
>> https://bugzilla.kernel.org/show_bug.cgi?id=30702
>> http://marc.info/?l=linux-mm&m=128942194520631&w=4
>>
>> The patch passes the gfp allocation flag all the way down to those
>> allocating functions.
>>
>
> You're going to run into trouble by hard-wiring __GFP_REPEAT into all of
> the pte allocations because if GFP_NOFS is used then direct reclaim will
> usually fail (see the comment for do_try_to_free_pages(): If the caller is
> !__GFP_FS then the probability of a failure is reasonably high) and, if
> it does so continuously, then the page allocator will loop forever.  This
> bit should probably be moved a level higher in your architecture changes
> to the caller passing GFP_KERNEL.

Thanks a lot for your reply. I should have seen your mail before
sending 23 mails :(
I will make the changes suggested by you and will resend all of the
patches again.

Thanks and Regards,
Prasad

>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]