linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan.kim@gmail.com>
To: Rik van Riel <riel@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Ken Chen <kenchen@google.com>, Ying Han <yinghan@google.com>,
	Hugh Dickins <hughd@google.com>, Nick Piggin <npiggin@gmail.com>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: don't flush TLB when propagate PTE access bit to struct page.
Date: Sat, 30 Oct 2010 09:20:18 +0900	[thread overview]
Message-ID: <AANLkTimQPE5CmvKHRdNy8c-wb3ehJ=Jv6mfkHWbHsMnW@mail.gmail.com> (raw)
In-Reply-To: <4CCAC8F3.3020704@redhat.com>

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=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-10-30  0:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 17:21 Ying Han
2010-10-27 18:05 ` Rik van Riel
2010-10-27 18:22   ` Nick Piggin
2010-10-27 18:37     ` Nick Piggin
2010-10-27 19:13       ` Hugh Dickins
2010-10-27 20:35         ` Ying Han
2010-10-28  0:11           ` KAMEZAWA Hiroyuki
2010-10-29  1:30             ` Ken Chen
2010-10-29  2:45               ` KAMEZAWA Hiroyuki
2010-10-29  3:43                 ` Rik van Riel
2010-10-29  4:27                   ` Minchan Kim
2010-10-29 12:31                     ` Rik van Riel
2010-10-29 13:03                       ` Minchan Kim
2010-10-29 13:15                         ` Rik van Riel
2010-10-30  0:20                           ` Minchan Kim [this message]
2010-10-27 20:19   ` Ying Han
2010-10-28 11:53     ` Rik van Riel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTimQPE5CmvKHRdNy8c-wb3ehJ=Jv6mfkHWbHsMnW@mail.gmail.com' \
    --to=minchan.kim@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kenchen@google.com \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@gmail.com \
    --cc=riel@redhat.com \
    --cc=yinghan@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox