From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by kanga.kvack.org (Postfix) with SMTP id 4E0C78D0030 for ; Fri, 29 Oct 2010 09:15:40 -0400 (EDT) Message-ID: <4CCAC8F3.3020704@redhat.com> Date: Fri, 29 Oct 2010 09:15:31 -0400 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [PATCH] mm: don't flush TLB when propagate PTE access bit to struct page. References: <1288200090-23554-1-git-send-email-yinghan@google.com> <4CC869F5.2070405@redhat.com> <20101028091158.4de545e9.kamezawa.hiroyu@jp.fujitsu.com> <20101029114529.4d3a8b9c.kamezawa.hiroyu@jp.fujitsu.com> <4CCA42D0.5090603@redhat.com> <4CCABEA0.8080909@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Minchan Kim Cc: KAMEZAWA Hiroyuki , Ken Chen , Ying Han , Hugh Dickins , Nick Piggin , linux-mm@kvack.org, Andrew Morton List-ID: On 10/29/2010 09:03 AM, Minchan Kim wrote: > On Fri, Oct 29, 2010 at 9:31 PM, Rik van Riel 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. -- All rights reversed -- 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: email@kvack.org