lkml.org 
[lkml]   [2012]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mm: shmem: unlock valid page
From
On Mon, Mar 5, 2012 at 1:51 AM, Hugh Dickins <hughd@google.com> wrote:
> On Sun, 4 Mar 2012, Hillf Danton wrote:
>> In shmem_read_mapping_page_gfp() page is unlocked if no error returned,
>> so the unlocked page has to valid.
>>
>> To guarantee that validity, when getting page, success result is feed
>> back to caller only when page is valid.
>>
>> Signed-off-by: Hillf Danton <dhillf@gmail.com>
>
> I don't understand your description, nor its relation to the patch.
>
> NAK to the patch: when no page has previously been allocated, the
> SGP_READ case avoids allocation and returns NULL - do_shmem_file_read
> then copies the ZERO_PAGE instead, avoiding lots of unnecessary memory
> allocation when reading a large sparse file.
>
Hi Hugh

Thanks for your review.

It was not well prepared as I missed SGP_CACHE.

-hd


\
 
 \ /
  Last update: 2012-03-05 13:17    [W:0.036 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site