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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 C7713C07E95 for ; Wed, 7 Jul 2021 15:11:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 539B261CC0 for ; Wed, 7 Jul 2021 15:11:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 539B261CC0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 295556B0036; Wed, 7 Jul 2021 11:11:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 245B36B005D; Wed, 7 Jul 2021 11:11:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 10E036B006C; Wed, 7 Jul 2021 11:11:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0244.hostedemail.com [216.40.44.244]) by kanga.kvack.org (Postfix) with ESMTP id E20186B0036 for ; Wed, 7 Jul 2021 11:11:00 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2AEC68249980 for ; Wed, 7 Jul 2021 15:11:00 +0000 (UTC) X-FDA: 78336129480.35.71C7C9A Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf06.hostedemail.com (Postfix) with ESMTP id A70CA801AF3B for ; Wed, 7 Jul 2021 15:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YBvoj0p+cw7rNWFJS293btY7G2SyLG5QlTGqGbKgJpE=; b=VfkYhMTWxTWXcvH47VoE0W62zb vxX7UJxvehXclaKrJGBbR/w9f8g0PtOMhxuJeQFCAKaGe+Ve/syaYom0T/RPHaB9yz4YtKlUYgo8c MnQycktnLj7xzcRGfdRVc4S7VVudEY0N6hyZUZqrAHokbRLZUEreEIBCKHhzcLqth8PKj/Jfhvf+V bPByt0Gw0Qq6bYg1AMSxnHoN+WJWgxKdr9zbV8KDyTu2sb5fHi4RdX+NeiIOfCZPr1LQRCsxE4zo2 0GWaFiIKBBZ70y/UcpkgXIUYJzWLACYoBMpWuhXMetEzaVaKsGsZ6kbuWi1aUgMdrgLnj2a72Qphv 0TB944Ng==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m19CL-00CW1H-1Y; Wed, 07 Jul 2021 15:10:50 +0000 Date: Wed, 7 Jul 2021 16:10:49 +0100 From: Matthew Wilcox To: Michal Hocko Cc: linux-mm@kvack.org, cgroups@vger.kernel.org, Johannes Weiner , Vladimir Davydov Subject: Re: [PATCH v3 13/18] mm/memcg: Add folio_memcg_lock() and folio_memcg_unlock() Message-ID: References: <20210630040034.1155892-1-willy@infradead.org> <20210630040034.1155892-14-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A70CA801AF3B X-Stat-Signature: ztjidez6dke5czx95w1wgr4c76bcamdz Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=VfkYhMTW; dmarc=none; spf=none (imf06.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1625670658-505977 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, Jun 30, 2021 at 10:32:02AM +0200, Michal Hocko wrote: > On Wed 30-06-21 05:00:29, Matthew Wilcox wrote: > > These are the folio equivalents of lock_page_memcg() and > > unlock_page_memcg(). Reimplement them as wrappers. > > Is there any reason why you haven't followed the same approach as for > the previous patches. I mean callers can call page_folio and then > lock_page_memcg wrapper shouldn't be really needed. At this point in the patch series there are ~20 places which call lock_page_memcg(). I think it makes more sense to leave the wrapper in place, and then we can remove the wrapper once all/most of these places are converted to use folios. There are another 5 conversions already in the patch series, eg here: https://git.infradead.org/users/willy/pagecache.git/commitdiff/a41c942c8e4b41df30be128ef6998ff1849fa36a > I do not really want to be annoying here but I have to say that I like > the conversion by previous patches much better than this wrapper > approach as mentioned during the previous review already. If you have > some reasons to stick with this approach for this particular case then > make it explicit in the changelog. OK, I can point to the number of callers as a reason to keep the wrappers in place. I intended to just do the conversion here, but seeing the number of callers made me reconsider. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH v3 13/18] mm/memcg: Add folio_memcg_lock() and folio_memcg_unlock() Date: Wed, 7 Jul 2021 16:10:49 +0100 Message-ID: References: <20210630040034.1155892-1-willy@infradead.org> <20210630040034.1155892-14-willy@infradead.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YBvoj0p+cw7rNWFJS293btY7G2SyLG5QlTGqGbKgJpE=; b=VfkYhMTWxTWXcvH47VoE0W62zb vxX7UJxvehXclaKrJGBbR/w9f8g0PtOMhxuJeQFCAKaGe+Ve/syaYom0T/RPHaB9yz4YtKlUYgo8c MnQycktnLj7xzcRGfdRVc4S7VVudEY0N6hyZUZqrAHokbRLZUEreEIBCKHhzcLqth8PKj/Jfhvf+V bPByt0Gw0Qq6bYg1AMSxnHoN+WJWgxKdr9zbV8KDyTu2sb5fHi4RdX+NeiIOfCZPr1LQRCsxE4zo2 0GWaFiIKBBZ70y/UcpkgXIUYJzWLACYoBMpWuhXMetEzaVaKsGsZ6kbuWi1aUgMdrgLnj2a72Qphv 0TB944Ng==; Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Michal Hocko Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Johannes Weiner , Vladimir Davydov On Wed, Jun 30, 2021 at 10:32:02AM +0200, Michal Hocko wrote: > On Wed 30-06-21 05:00:29, Matthew Wilcox wrote: > > These are the folio equivalents of lock_page_memcg() and > > unlock_page_memcg(). Reimplement them as wrappers. > > Is there any reason why you haven't followed the same approach as for > the previous patches. I mean callers can call page_folio and then > lock_page_memcg wrapper shouldn't be really needed. At this point in the patch series there are ~20 places which call lock_page_memcg(). I think it makes more sense to leave the wrapper in place, and then we can remove the wrapper once all/most of these places are converted to use folios. There are another 5 conversions already in the patch series, eg here: https://git.infradead.org/users/willy/pagecache.git/commitdiff/a41c942c8e4b41df30be128ef6998ff1849fa36a > I do not really want to be annoying here but I have to say that I like > the conversion by previous patches much better than this wrapper > approach as mentioned during the previous review already. If you have > some reasons to stick with this approach for this particular case then > make it explicit in the changelog. OK, I can point to the number of callers as a reason to keep the wrappers in place. I intended to just do the conversion here, but seeing the number of callers made me reconsider.