Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965854Ab2JZSMF (ORCPT ); Fri, 26 Oct 2012 14:12:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54414 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965638Ab2JZSMD (ORCPT ); Fri, 26 Oct 2012 14:12:03 -0400 Message-ID: <508AD2FF.5020306@redhat.com> Date: Fri, 26 Oct 2012 14:14:23 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 MIME-Version: 1.0 To: Linus Torvalds CC: Michel Lespinasse , Peter Zijlstra , Andrea Arcangeli , Mel Gorman , Johannes Weiner , Thomas Gleixner , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Ingo Molnar Subject: Re: [PATCH 05/31] x86/mm: Reduce tlb flushes from ptep_set_access_flags() References: <20121025121617.617683848@chello.nl> <20121025124832.840241082@chello.nl> <5089F5B5.1050206@redhat.com> <508A0A0D.4090001@redhat.com> <508ACE6E.8060303@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1581 Lines: 37 On 10/26/2012 02:02 PM, Linus Torvalds wrote: > On Fri, Oct 26, 2012 at 10:54 AM, Rik van Riel wrote: >> >> Would tlb_fix_spurious_fault take care of that on those >> architectures? > > .. assuming that they implement it as a real TLB flush, yes. > > But maybe the architecture never noticed that it happened to depend on > the fact that we do a cross-CPU invalidate? So a missing > tlb_fix_spurious_fault() implementation could cause a short loop of > repeated page faults, until the IPI happens. And it would be so > incredibly rare that nobody would ever have noticed. > > And if that could have happened, then with the cross-cpu invalidate > removed, the "incredibly rare short-lived constant page fault retry" > could turn into "incredibly rare lockup due to infinite page fault > retry due to TLB entry that never turns dirty despite it being marked > dirty by SW in the in-memory page tables". I suspect the next context switch would flush out the TLB, making it a slowdown, not a lockup. Still a good reason to make such a change in its own commit, so it can be bisected and tracked down. The commit message could tell architecture maintainers what to do if this particular commit got them into trouble: implement a proper local TLB flush in tlb_fix_spurious_fault. I'll send this in as a separate patch. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/