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 X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A6B6C2D0E0 for ; Wed, 9 Sep 2020 21:05:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 72F1B206D4 for ; Wed, 9 Sep 2020 21:05:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qENp4mbY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72F1B206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AA6146B005C; Wed, 9 Sep 2020 17:05:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A56D56B0062; Wed, 9 Sep 2020 17:05:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 91D1E6B0068; Wed, 9 Sep 2020 17:05:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0108.hostedemail.com [216.40.44.108]) by kanga.kvack.org (Postfix) with ESMTP id 756346B005C for ; Wed, 9 Sep 2020 17:05:41 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 33BA13626 for ; Wed, 9 Sep 2020 21:05:41 +0000 (UTC) X-FDA: 77244754482.10.cream11_2715257270e0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 00B3616A047 for ; Wed, 9 Sep 2020 21:05:40 +0000 (UTC) X-HE-Tag: cream11_2715257270e0 X-Filterd-Recvd-Size: 5882 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Sep 2020 21:05:38 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id g72so3879785qke.8 for ; Wed, 09 Sep 2020 14:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=jknzGmoqJw1EY5KNXFDJSNgXqjt2RuOtc/p1w7k0/AY=; b=qENp4mbYweCT8tAiqEN3O3TLh+thuG3dwWPJLgqJgRNAryhOqmBvIevkwDDtq/X+Cq IU2OoPp9i+zLhxB0W9Fliq1WToqWvbjwKfMcK+QyHwjV9Mj2DAFUOA/yqwhW7ZOJtXu/ RwzgtlZTJIrzbFikLUMtDM+lR30uPVWwKKjYziRPi2gbMVfyaOvlu8i4qiJ92OCBrMvv 4SOEUcUjqDmB42cQ3lWF+lINiNnPIcnQiNmmFVanyRhkZryZdbB3DQhd7yF9sCvlu1rZ vEhRhA1II2U3kVSRo3OH275fqPurXhxu3LWIjtb/aqeqWFFVpXs/RN9z9ZoE/mCEu44a s4XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=jknzGmoqJw1EY5KNXFDJSNgXqjt2RuOtc/p1w7k0/AY=; b=UwTkR/+AYTR9tjwKvE1hRVYODplKN/pc2k3IKhQVUEuvfM+I2sgqmGZOaaIVrH8f03 0cMm5I0oKo23MRLn8vpRVHF/CxQmTOJz5Dqw2c6qM/CoE2pkLClV/P4HlT/ApmbiWpdm 1XhXCAs5+SnnudfQIErUUqHzEcmGmgJ5gGCaams5ITd/1IguuBXzh1eVWCWTgMdEerZA lIUElag22V8R0nFF/ZBi9+vwv3nkralq0U+qKhKcNZILcns+mNC8eCbRRTczLTI1td/R F99e9XCf7ExyG8mfRzsI+1LlyMhjAgMV9JT8+dQMXzoWz8bhOU4I+3J2CA06poGFzShX Qwgg== X-Gm-Message-State: AOAM530bc0p2cI9vBYhZ7ceqLXOdYIUO5RkcQrim8U0exIjVi9FED3s+ Vnlg4/IalF1S60kT+TV6U+EscA== X-Google-Smtp-Source: ABdhPJzIHnUITkjhNzx36HupQ/sfRxXSwKpb2OivAv6/ZFVFzgHkZlZvShHJwwTX+di1qejHJNVayg== X-Received: by 2002:a37:e401:: with SMTP id y1mr4090429qkf.150.1599685537274; Wed, 09 Sep 2020 14:05:37 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id e9sm4063695qkb.8.2020.09.09.14.05.34 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Wed, 09 Sep 2020 14:05:36 -0700 (PDT) Date: Wed, 9 Sep 2020 14:05:20 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Matthew Wilcox cc: Hugh Dickins , Alexander Duyck , Alex Shi , Andrew Morton , Mel Gorman , Tejun Heo , Konstantin Khlebnikov , Daniel Jordan , Johannes Weiner , kbuild test robot , linux-mm , LKML , cgroups@vger.kernel.org, Shakeel Butt , Joonsoo Kim , Wei Yang , "Kirill A. Shutemov" , Rong Chen , Michal Hocko , Vladimir Davydov , shy828301@gmail.com, Alexander Duyck Subject: Re: [PATCH v18 31/32] mm: Add explicit page decrement in exception path for isolate_lru_pages In-Reply-To: <20200909201530.GM6583@casper.infradead.org> Message-ID: References: <1598273705-69124-1-git-send-email-alex.shi@linux.alibaba.com> <1598273705-69124-32-git-send-email-alex.shi@linux.alibaba.com> <20200909010118.GB6583@casper.infradead.org> <20200909201530.GM6583@casper.infradead.org> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Rspamd-Queue-Id: 00B3616A047 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 Wed, 9 Sep 2020, Matthew Wilcox wrote: > On Wed, Sep 09, 2020 at 11:24:14AM -0700, Hugh Dickins wrote: > > After overnight reflection, my own preference would be simply to > > drop this patch. I think we are making altogether too much of a > > fuss here over what was simply correct as plain put_page() > > (and further from correct if we change it to leak the page in an > > unforeseen circumstance). > > > > And if Alex's comment was not quite grammatically correct, never mind, > > it said as much as was worth saying. I got more worried by his > > placement of the "busy:" label, but that does appear to work correctly. > > > > There's probably a thousand places where put_page() is used, where > > it would be troublesome if it were the final put_page(): this one > > bothered you because you'd been looking at isolate_migratepages_block(), > > and its necessary avoidance of lru_lock recursion on put_page(); > > but let's just just leave this put_page() as is. > > My problem with put_page() is that it's no longer the simple > decrement-and-branch-to-slow-path-if-zero that it used to be. It has the > awful devmap excrement in it so it really expands into a lot of code. > I really wish that "feature" could be backed out again. It clearly > wasn't ready for merge. And I suppose I should thank you for opening my eyes to that. I knew there was "dev" stuff inside __put_page(), but didn't realize that the inline put_page() has now been defiled. Yes, I agree, that is horrid and begs to be undone. But this is not the mail thread for discussing that, and we should not use strange alternatives to put_page(), here or elsewhere, just to avoid that (surely? hopefully?) temporary excrescence. Hugh