From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9C80C433F5 for ; Fri, 24 Sep 2021 23:05:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1745E61039 for ; Fri, 24 Sep 2021 23:05:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1745E61039 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id A925C900002; Fri, 24 Sep 2021 19:05:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A423E6B0072; Fri, 24 Sep 2021 19:05:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 930B9900002; Fri, 24 Sep 2021 19:05:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id 853E16B0071 for ; Fri, 24 Sep 2021 19:05:10 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3E09E274D6 for ; Fri, 24 Sep 2021 23:05:10 +0000 (UTC) X-FDA: 78623999580.13.8130B54 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by imf14.hostedemail.com (Postfix) with ESMTP id E96046001980 for ; Fri, 24 Sep 2021 23:05:09 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id y28so46111814lfb.0 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=5qZrakgU3oGH4YXpERIQ2fViTGdtiUWC6vohPBlfJNs2cQ1Uc8CuVNy0Aarm9egoD+ aHgfFc/mr2vw1krp6jaHebY8sF4r0NKu7Km2zGTVJwekXymDE13C40A8cahPkYAPFdXf 1g5VsEpcjGozSKA1vB9e2Ox+70r2NOAusJT8ThoeAk7cSIHq9XJNd0CtvGmx67aCIXo4 C1NWCqIX9BoVuY+P0g9Aah+tkEIxPRxDXSnKCDAfo6ZhAbDKr9d4Zp2lYih6VRZtDSf6 gdP+1QqFvhJ0raKoGeMM2bI6XznD9uqTC5qFfDbtTcBMLmSkmAwgnSMUuzTVPZmuiAI4 Tvfg== X-Gm-Message-State: AOAM532cFPSNrVxP+Ad2ttVyAqzK0+DF7WStS1A0E5AYaSQoDhUqMjEH Dn4dNk7M2oaXJ9m5ffHzoiBvNQ== X-Google-Smtp-Source: ABdhPJyABEn2XeZ/MdEk0AnHAYoFB7lLkWh75SgVQ/M/bCH1ThvH6y+h6j84xhJLr4fbYzmt8DXaoQ== 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> Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b=QHFaZY0z; spf=none (imf14.hostedemail.com: domain of kirill@shutemov.name has no SPF policy when checking 209.85.167.46) smtp.mailfrom=kirill@shutemov.name; dmarc=none X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: E96046001980 X-Stat-Signature: 5gf8kdrtcta7q8wgximpknd1g7ifhk8e X-HE-Tag: 1632524709-788862 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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