Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2180293pxb; Fri, 24 Sep 2021 23:37:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMVM1kxUkpqJUTOfQ4P5qoWe3CT0ZMgJzRXnN3mildbVFaAI0pVdxsl5wNYxkCQ54FKsXu X-Received: by 2002:a05:6e02:551:: with SMTP id i17mr11328673ils.281.1632551850189; Fri, 24 Sep 2021 23:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632551850; cv=none; d=google.com; s=arc-20160816; b=FN2kuYEzX3PVlR4pzmtpLQ9YVMYqnOweFhwgo5R2wtsGOe+XhiYiwpD6j4hBiFBtny 2kSYICIe+2bnH2JDefBWvp/JGKqEg+uxBuiesam7aywsnZUZYJj24L3EJ5cKoOqsM1k7 HLs4ttqP4bl+UCVqag5zhmdW3VAzk01F0svstwlxlGjsnOHK9Lh3etyqa0vd4gGfGFUY ARgWR2buFD+FO0eBzw+FxicRW0kmnKeOCfVY4WYHpClTGN1rwpy0hGqQDBlgonPnQKMk caVbn5wBiM0JFxknnWdYFo9UM5ad+g1/Zvs85csk/k7dqIeRmPbQ78FQryZV5TPpY5y2 4zEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QeB/QlIkVc1HaPnxXOxXzZA9RrsagX4tww0bEUkv5O4=; b=E7N175O1jnIkORlvYrwh1aBHBA0d6RQhJc4xgldBD5ov0kcYICZ06k5UaTDOTicgns 11AS0quOhlhgBxJw8/aZYeuG7U/0cgPHwUC6vAsywsB+q7Gie4wKhU6JNr9HLvijBay2 S4c+Tx+D3YZ1zk11aprJ/9Mw4wdoFSu+3Nxbt9g/gb6rG20BOsp0u784HCFBu1B5xNWd atcnoUQ8rEqdFjLe0e6TeiAcv5CPMSTV6zWVOVtvbLBX1pkGfcljLRGodS7eWe7G/v1a sshfdyEqoXnzq4p6e9/6+HCFU+xGX6D631gWr8TxP+UxWUiiihrWJVUrlS5DoplQxzYb +66Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b=QHFaZY0z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a24si12375236ioc.90.2021.09.24.23.37.19; Fri, 24 Sep 2021 23:37:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b=QHFaZY0z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346038AbhIXXGo (ORCPT + 99 others); Fri, 24 Sep 2021 19:06:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231674AbhIXXGn (ORCPT ); Fri, 24 Sep 2021 19:06:43 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0459C061571 for ; Fri, 24 Sep 2021 16:05:09 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id g41so46444723lfv.1 for ; Fri, 24 Sep 2021 16:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=QeB/QlIkVc1HaPnxXOxXzZA9RrsagX4tww0bEUkv5O4=; b=QHFaZY0zUtpimbNKGHO1HkSh2M2muQMq1XJ3mPWhBKWPCmDd0eRiRNkYay1Zi1Qgc7 bYf4q/QP1eziQ3PbH1gXrdHcCpGYyU3NyphmUMGtZ5fzJRZY8LbC7Tlf3GN02I+iSAOZ PtKM2w1HHSMoyL13G4mqrbVzviCP+S42UYrIQ4bf5HsOpLFIB1t0Kg6NlFVd+o2SRqPW rWbJ8aIdU56Jpz/4sWJoM2P485ppEfhJOnoh2bynyWNYJUDIQzYYG7rENC7ux7JygphD SPHR9WxqgEJrK+vA3fYQQHCvgf/adfSv4O1QifhO+ii2WZ7rzcnpn3vmERRux1tjcjO9 a8zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=QeB/QlIkVc1HaPnxXOxXzZA9RrsagX4tww0bEUkv5O4=; b=SCTmCo5QyO1YrxFOh3O0F5Z6Uur7MAoIq4OhakJQo5bGkUmtgnDKnjRZExfnn7afAH Vpf8t+QCAI1G3fm1pRTNApHo+/Z7Ntg/5WgGIhfEB1QqjnIuGQxcdEhlJiYgTmcZ5XRz /QxBGwtvxoRC2unmWq76PySgyj9zYWNOtAaWdDLZS+ctwu/g0GTs27EGngE4uPAy+fKm WXiOHYGlgsqLWjyU0P7cZQicAXKKpIfwPAZKvJgDzPpK2AissGhiMN5HrWinhX/3MFjP Xe1syN9n9qALx5mwroVLG4JLGErG+X2X1t0Kz1wVBiZrsnpLUIqxQ9NwygbBiBLNvvnU BQeg== X-Gm-Message-State: AOAM532etFy9pqOfaW69L7Zgal3cmdktv8RNHEW9eeiHDM5BGvp4E8Yp eDtVok7gsdbbPSJg6/OGvXbHPA== X-Received: by 2002:a2e:9e4c:: with SMTP id g12mr13602346ljk.433.1632524708253; Fri, 24 Sep 2021 16:05:08 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id s7sm964001lfi.130.2021.09.24.16.05.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 16:05:07 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 7CDA6102FC4; Sat, 25 Sep 2021 02:05:05 +0300 (+03) Date: Sat, 25 Sep 2021 02:05:05 +0300 From: "Kirill A. Shutemov" To: Hugh Dickins Cc: Matthew Wilcox , Kent Overstreet , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Johannes Weiner , Linus Torvalds , Andrew Morton , "Darrick J. Wong" , Christoph Hellwig , David Howells , Mike Kravetz Subject: Re: Mapcount of subpages Message-ID: <20210924230505.vlql2mdjfcotkuqj@box.shutemov.name> References: <20210923124502.nxfdaoiov4sysed4@box.shutemov.name> <72cc2691-5ebe-8b56-1fe8-eeb4eb4a4c74@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72cc2691-5ebe-8b56-1fe8-eeb4eb4a4c74@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 23, 2021 at 02:10:13PM -0700, Hugh Dickins wrote: > But you have a different point in mind when you refer to superfluous > CoW and GUP: I don't know the score there (and I think we are still in > that halfway zone, since pte CoW was changed to depend on page_count, > but THP CoW still depending on mapcount). I didn't pay enough attention to the topic when the change to depend on page_count was made. I need to catch up. I look at what direction Andrea went in his patchset and so far I *feel* he has a point[1]. I have not read the whole thing yet and I don't have a firm position here, but maybe we need to get to the bottom of the topic before considering ditching per-subpage mapcount. [1] https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git/tree/mm/memory.c?h=mapcount_deshare&id=e1cb3108d4131c2a7da03fbd37c3230cf082bfd9#n3153 -- Kirill A. Shutemov