From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by kanga.kvack.org (Postfix) with ESMTP id BC2546B0035 for ; Thu, 24 Apr 2014 22:46:22 -0400 (EDT) Received: by mail-ve0-f171.google.com with SMTP id jy13so3982556veb.16 for ; Thu, 24 Apr 2014 19:46:22 -0700 (PDT) Received: from mail-vc0-x22c.google.com (mail-vc0-x22c.google.com [2607:f8b0:400c:c03::22c]) by mx.google.com with ESMTPS id pu9si1402721vec.155.2014.04.24.19.46.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 19:46:22 -0700 (PDT) Received: by mail-vc0-f172.google.com with SMTP id la4so4048390vcb.17 for ; Thu, 24 Apr 2014 19:46:21 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1398393700.8437.22.camel@pasglop> References: <53558507.9050703@zytor.com> <53559F48.8040808@intel.com> <20140422075459.GD11182@twins.programming.kicks-ass.net> <20140423184145.GH17824@quack.suse.cz> <20140424065133.GX26782@laptop.programming.kicks-ass.net> <1398389846.8437.6.camel@pasglop> <1398393700.8437.22.camel@pasglop> Date: Thu, 24 Apr 2014 19:46:21 -0700 Message-ID: Subject: Re: Dirty/Access bits vs. page content From: Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Benjamin Herrenschmidt Cc: Hugh Dickins , Peter Zijlstra , Jan Kara , Dave Hansen , "H. Peter Anvin" , "linux-arch@vger.kernel.org" , linux-mm , Russell King - ARM Linux , Tony Luck On Thu, Apr 24, 2014 at 7:41 PM, Benjamin Herrenschmidt wrote: > On Fri, 2014-04-25 at 11:37 +1000, Benjamin Herrenschmidt wrote: >> >> The flip side is that we do a lot more IPIs for large invalidates, >> since we drop the PTL on every page table page. > > Oh I missed that your patch was smart enough to only do that in the > presence of non-anonymous dirty pages. That should take care of the > common case of short lived programs, those should still fit in a > single big batch. Right. It only causes extra TLB shootdowns for dirty shared mappings. Which, let's face it, don't actually ever happen. Using mmap to write to files is actually very rare, because it really sucks in just about all possible ways. There are almost no loads where it's not better to just use a "write()" system call instead. So the dirty shared mapping case _exists_, but it's pretty darn unusual. The case where you have lots of mmap/munmap activity is even less unusual. I suspect the most common case is for stress-testing the VM, because nobody sane does it for an actual real load. Linus -- 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