Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp648565imm; Wed, 29 Aug 2018 08:44:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbVrASDI7rS9VUiTOBEbQsGFfVuqagI1hDWK75FHob5xVpiqW0fXlc6Ur0vCcOGAXpZbmiV X-Received: by 2002:a62:9e08:: with SMTP id s8-v6mr6606044pfd.23.1535557466363; Wed, 29 Aug 2018 08:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535557466; cv=none; d=google.com; s=arc-20160816; b=RYBhsy6w1lCL8MKzlolFmId5vyY7zAy+yfD8YBWPSIHgHCcSgqfzA7QwqQSRMkGI+l RMwAumdc+yumMH7xgn0kIwY9XRsBt4Tz+eT6YnA0ZZmMJgFDyWhEqEvt3J7aqmmVMd7y Cfi3umtSo8qljfkSDRjmGlOOei67hXRGrdF1dANkFJgcTBYLCUD1DqzszoA7wzpyd9VE KByZNNsHI21fDOu3T5S2r3P/NSjNMWQTPgzhtutEXa55hFQG/prpzbYlNho7k2c7gKjP lVyPtlvw1em2CNMt1oft9kCu3+FsmF9h5/zGLchS7DYe/1bp+Xk8RnCwy7j4y28TjYiU izTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=fBgiGE6VOGyUUM+0z038kipmEO9nK31ZqzDttSMv5yo=; b=EGOV9xdBANPwoA5IGJ0Toie40/h6de3elquYHNC+43uixWuOqLBPSd5435LTGnO3fb uRF8wcxHFGIpjz6JMVI1/iLQeRkOgmRGyF3tdNTCWo/wrsWk6pNN3GFaJKpdjoRbDxXv CnXV4zrjfJAP1loxhfjJERl3RKx2A41W2CRuadlOC3Mty0MD3tZiOWDaWwaOqtwyeO+z kLWf56cOP/MGri1KifzgwBLYnW9Pd+eE/iqSHGF41FrlKnBwnCFtUrYoi+OLpqYAcJT6 ZjUpjq5HQDwJMLdri8j5RpK7eZiCB/1ujKRC7AwwEh8yh07XMPLqUwTrdQFGEr8LwlXf yfOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Hb4rWtSd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5-v6si4601736plm.445.2018.08.29.08.44.11; Wed, 29 Aug 2018 08:44:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Hb4rWtSd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729169AbeH2Tjw (ORCPT + 99 others); Wed, 29 Aug 2018 15:39:52 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:36304 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727562AbeH2Tjw (ORCPT ); Wed, 29 Aug 2018 15:39:52 -0400 Received: by mail-it0-f67.google.com with SMTP id u13-v6so7806085iti.1; Wed, 29 Aug 2018 08:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fBgiGE6VOGyUUM+0z038kipmEO9nK31ZqzDttSMv5yo=; b=Hb4rWtSdYtyZ2pauP0RHz9Twg04UpT+DewQCVAYv6XCoERQwg2JgYTJa0xjcOfXz+t LPj+fzX+7bR/tJd2vRq5iXPak9NIJ7nw2Ch15HWuuQzVVYstDXP5LtEHYMNaKcGSLtvn gzA/XcKPKlecdHH2skF8DOnMvNwQewnVWPO2U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fBgiGE6VOGyUUM+0z038kipmEO9nK31ZqzDttSMv5yo=; b=YxH3mCLYRQbgl5gqlv3PmmBmFhFNMbwgjQykp3DfScht03GiItbUrP7+m4Itj+J7+f TQ7CaiPDkI56Y1X79bcidiI/LkUEYq2yRmItayCxTkXTTa+gaKCF8EXa/9/MTm8anlLK oih/2auKk/Ty15GP2gNRJTnlcrkAD+1AAKVuvi8NpmMUohv8LO/WQAsGWVpc/rUW2hzt oeEk0zUNq7VgIyd+AwzXAb6Iv7ubt+QzkJwlFyWm/rQ4QKZS9J32klYOGytJWHXEBXjM pMToj7ZrxinSXXgtGW88ZK1/pUwRo8owyBO1O5FE7qVWkrrd7D1Sh4HeC8VT36ew/Gk2 QnOQ== X-Gm-Message-State: APzg51DOD3c9VT1Q6I7dfqEiJtP9Tz5iTnEMu10gkO4pprIo1Znc5/SN o1xq0w07yTwdMaywWNeD+jMrPb11z1ZRthRpKWE= X-Received: by 2002:a24:8309:: with SMTP id d9-v6mr5747089ite.123.1535557340624; Wed, 29 Aug 2018 08:42:20 -0700 (PDT) MIME-Version: 1.0 References: <20180828112034.30875-1-npiggin@gmail.com> <20180828112034.30875-3-npiggin@gmail.com> In-Reply-To: <20180828112034.30875-3-npiggin@gmail.com> From: Linus Torvalds Date: Wed, 29 Aug 2018 08:42:09 -0700 Message-ID: Subject: Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork To: Nick Piggin Cc: linux-mm , linux-arch , Linux Kernel Mailing List , ppc-dev , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 28, 2018 at 4:20 AM Nicholas Piggin wrote: > > fork clears dirty/accessed bits from new ptes in the child. This logic > has existed since mapped page reclaim was done by scanning ptes when > it may have been quite important. Today with physical based pte > scanning, there is less reason to clear these bits. Can you humor me, and make the dirty/accessed bit patches separate? There is actually a difference wrt the dirty bit: if we unmap an area with dirty pages, we have to do the special synchronous flush. So a clean page in the virtual mapping is _literally_ cheaper to have. > This eliminates a major source of faults powerpc/radix requires to set > dirty/accessed bits in ptes, speeding up a fork/exit microbenchmark by > about 5% on POWER9 (16600 -> 17500 fork/execs per second). I don't think the dirty bit matters. The accessed bit I think may be worth keeping, so by all means remove the mkold. Linus