lkml.org 
[lkml]   [2010]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [BUG] bug when enabling VM DEBUG
* Catalin Marinas | 2010-05-12 12:10:39 [+0100]:

>> > --- a/drivers/ata/libata-sff.c
>> > +++ b/drivers/ata/libata-sff.c
>> > @@ -894,7 +894,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
>> > do_write);
>> > }
>> >
>> > - if (!do_write)
>> > + if (!do_write&& !PageSlab(page))
>> > flush_dcache_page(page);
>>
>> I would think that check belongs inside flush_dcache_page itself, rather
>> than forcing every driver to include it..
>
>Sebastian (cc'ed) reported this as well for MIPS.
Thx. The patch above looks what I've sent a while ago. Jeff was going to
merge it afaik.

>I think it makes sense for this check to be done in the
>flush_dcache_page() function.

Why should flush_dcache_page() not flush pages you tell it?
From Documentation/cachetlb.txt:
| NOTE: This routine need only be called for page cache pages
| which can potentially ever be mapped into the address
| space of a user process. So for example, VFS layer code
| handling vfs symlinks in the page cache need not call
| this interface at all.

A page from slab or stack is not going to see the sky of user land and
therefore it should not be fed into flush_dcache_page().

Sebastian


\
 
 \ /
  Last update: 2010-05-12 13:55    [W:0.061 / U:14.048 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site