From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752242AbbCGSmc (ORCPT ); Sat, 7 Mar 2015 13:42:32 -0500 Received: from mail-ig0-f174.google.com ([209.85.213.174]:34344 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752131AbbCGSma (ORCPT ); Sat, 7 Mar 2015 13:42:30 -0500 MIME-Version: 1.0 In-Reply-To: References: <1425741651-29152-1-git-send-email-mgorman@suse.de> <1425741651-29152-4-git-send-email-mgorman@suse.de> Date: Sat, 7 Mar 2015 10:42:29 -0800 X-Google-Sender-Auth: 7D2RBrjTYWIv8ji7xqazJ-eRBlY Message-ID: Subject: Re: [PATCH 3/4] mm: numa: Mark huge PTEs young when clearing NUMA hinting faults From: Linus Torvalds To: Mel Gorman Cc: Dave Chinner , Andrew Morton , Ingo Molnar , Aneesh Kumar , Linux Kernel Mailing List , Linux-MM , xfs@oss.sgi.com, ppc-dev Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 7, 2015 at 10:33 AM, Linus Torvalds wrote: > > Completely untested, but that "just > or in the new protection bits" is what pnf_pte() does just a few lines > above this. Hmm. Looking at this, we do *not* want to set _PAGE_ACCESSED when we turn a page into PROT_NONE or mark it for numa faulting. Nor do we want to set it for mprotect for random pages that we haven't actually accessed, just changed the protections for. So my patch was obviously wrong, and I should feel bad for suggesting it. I'm a moron, and my expectations that "pte_modify()" would just take the accessed bit from the vm_page_prot field was stupid and wrong. Mel's patch is the right thing to do. Linus