[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-mm
Subject:    Re: [PATCH] mm: don't flush TLB when propagate PTE access bit to
From:       Minchan Kim <minchan.kim () gmail ! com>
Date:       2010-10-30 0:20:18
Message-ID: AANLkTimQPE5CmvKHRdNy8c-wb3ehJ=Jv6mfkHWbHsMnW () mail ! gmail ! com
[Download RAW message or body]

On Fri, Oct 29, 2010 at 10:15 PM, Rik van Riel <riel@redhat.com> wrote:
> On 10/29/2010 09:03 AM, Minchan Kim wrote:
>>
>> On Fri, Oct 29, 2010 at 9:31 PM, Rik van Riel<riel@redhat.com>  wrote:
>>>
>>> On 10/29/2010 12:27 AM, Minchan Kim wrote:
>>>
>>>> What happens if we don't flush TLB?
>>>> It will make for old page to pretend young page.
>>>> If it is, how does it affect reclaim?
>>>
>>> Other way around - it will make a young page pretend to be an
>>> old page, because the TLB won't know it needs to flush the
>>> Accessed bit into the page tables (where the bit was recently
>>> cleared).
>>
>> Ying's patch just removes TLB flush when page access bit is changed
>> from young to old.
>> We still flush TLB flush when from old to young change by
>> ptep_set_access_flags. Do I miss something?
>
> The TLB is write-through for the accessed and dirty
> bits.
>
> If the TLB has a page translation without the accessed
> bit (and is accessing it), the accessed bit will be set
> in the page table entry.
>
> If the TLB has a page translation that already has the
> accessed bit set, nothing will be written to the page
> table entry.
>
> With Ying's change, we will clear the accessed bit in
> the page table, without invalidating the corresponding
> TLB entry.
>
> This can cause accesses to pages to not lead to the
> accessed bit getting set in the corresponding page table
> entry.
>
> Making sure the TLB is flushed periodically could fix
> that issue.

Thanks for the kind explanation, Rik.
I got your point.

While we lost access bit during short time, inactive list size is
enough long to promote the page.
So for the page lost access bit is to be working set, it have to be
accessed again until moving the tail of inactive list

I think inactive list's size could be point for starting TLB flush.

>
> --
> All rights reversed
>



-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic