Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2703009rwb; Wed, 30 Nov 2022 09:44:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf4gpoeU6c31xNnBK2NSPKyjiMyNfWgS8pYI1nxdbb0hi9VSVD3uIad/anDyNdr+eUPLxar9 X-Received: by 2002:a05:6402:691:b0:46b:c11:9f59 with SMTP id f17-20020a056402069100b0046b0c119f59mr16528814edy.407.1669830258713; Wed, 30 Nov 2022 09:44:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669830258; cv=none; d=google.com; s=arc-20160816; b=0/iYnUnBKY1O34lmOYwTKT7B5xDXY4kNdnV4r/7lHUkvvAKEu6nFXhlyFJHa51Hwde iA5ARj7bBrCqFjfrr3D0/7M3MttGlfOimVh/SMh85EC52PHeQ9rtlN2mK3Nm6sGemN4e 2+O0UXgxKp6MC7D1/Dk7nHBWBHRVShY/YKANn69pgMxGQc/LBY12Dk2DX1VkGhoY7ndT q7Tk1vZ6dvEmZPI/nc84A9h/YOy1Ukj3Pf16uJU8n54IpRAQdxdhzyv39oaIjwIpLN7q JSkXhkIF/rrFgfWoNPpK+iXrAQvCI/axS/VTFy9q9nJZdRhBwxl24XD0aTAGsJzq8UcM tJsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=ZAKs3FMJBtAtSZmpMRqAhPhuYj2WYHmeTXUWNI3mQVg=; b=phGN4Vjh23vYOaOWBjvIubwXd1vyTXFdxslTlGzBfyPQpZh9ScK103svTxdlZVHLfC KBiJI6cexjJMDdffL4MLK3yd7ttRM3Slcn5Fw/Q4ZqQEP3MymKvEHpT3UWMlqTXLEcAL qEVKFOFsxJJmR/GbMSZl5DgPqKFl7jKLQyUN5TtwBLWS2/WXAACUFXFSsJw9exxwdD5j VcEtf/IMkniQk4aLyxuqG1Xfi5Gn9xXnzRAJgxCj8hkJyiV7XvioqS1W8tZVhQPykijJ nayD4kZm8JHSFTpyAE5DcXqn00Xq2B23ImFzXsoG6vj/y5KOhoyfAlc+DL//rj5xpiMU dQ+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=fJBBa1j7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020aa7d795000000b0046aaf5398c8si1659246edq.174.2022.11.30.09.43.58; Wed, 30 Nov 2022 09:44:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=fJBBa1j7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229819AbiK3Rgf (ORCPT + 83 others); Wed, 30 Nov 2022 12:36:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiK3Rg2 (ORCPT ); Wed, 30 Nov 2022 12:36:28 -0500 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 043EB2935A for ; Wed, 30 Nov 2022 09:36:28 -0800 (PST) Received: by mail-oi1-x22c.google.com with SMTP id t62so19488901oib.12 for ; Wed, 30 Nov 2022 09:36:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=ZAKs3FMJBtAtSZmpMRqAhPhuYj2WYHmeTXUWNI3mQVg=; b=fJBBa1j79Fa7M86oY1GqNIx2ObJfcN5mkJX50cLznX2i/Mlzs/UYvl4OW57QqMmhG0 ONTAX680s68WxcDKVX0S8CMyE+l1doSN7smFea8TsuQD/LRKFwk3L8vFBsC/Xjnnru/V S+yUFYkIHXbOz90AAwQZbe7iuYN+6WIMprTOi0la2d5y64Ju30bZzim+TrVfUCuBWmnP yLN1wwz0ydAvWiKE9WeVvXhQzh6YlFCnQfkvEyQSeX24fUjBSs/h9qkY3kWLB0j9Myj9 cjkqAvWDw/EyCgvdIhk8fgwjkPQe1F8swmEwAaTOGPyeul5eGkiHnoNereC82GlOkSqE rbJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZAKs3FMJBtAtSZmpMRqAhPhuYj2WYHmeTXUWNI3mQVg=; b=FpFmB2HI647U1TsrGbhuupkzqh2RIW7Wkd4PO2/WR6ycYgbtDKAuXClGNDBpp3Uv0j 3r7s7KVRp+kdHmaGvJ6vvPXPmhcVxEkYVmHDdgP9HcTZ71dza5d+QTZSwwscJB3/qw3e jguTN0pABzEVZJXG/hPQo3/Yf60WaM6qYXzzz6EqBQeKUyhS1KtLla5yahSFXeODHrZJ NjVvC/4SEIuiizxMGaBAZcG3HkqmPSUL8Ow/z0QbSIjI8jAMCpOtGKCc3Z65X2MslecK +xrm2rvHYyf499hRZO84yqxFaimTGWcbWj3YcJd3crtQSI2cCzcSQb43RUHQaS94uIlD S2UQ== X-Gm-Message-State: ANoB5pnQLsRk+ylE3Ri+uxyyCZiHvSUgoYaIwJm5aox2Fmx9yzlJDaKH Qm42ZlZ5ep9QmkB2WQZoRgAS6Q== X-Received: by 2002:a05:6808:493:b0:354:6112:4160 with SMTP id z19-20020a056808049300b0035461124160mr30939687oid.11.1669829787189; Wed, 30 Nov 2022 09:36:27 -0800 (PST) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id bm1-20020a056830374100b0066871c3adb3sm1174153otb.28.2022.11.30.09.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 09:36:25 -0800 (PST) Date: Wed, 30 Nov 2022 09:36:15 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Shakeel Butt cc: Hugh Dickins , Johannes Weiner , Andrew Morton , Linus Torvalds , Michal Hocko , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: remove lock_page_memcg() from rmap In-Reply-To: Message-ID: References: <20221123181838.1373440-1-hannes@cmpxchg.org> <16dd09c-bb6c-6058-2b3-7559b5aefe9@google.com> <3659bbe0-ccf2-7feb-5465-b287593aa421@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 30 Nov 2022, Shakeel Butt wrote: > > 2. For 6.2 (or 6.3), remove the non-present pte migration with some > additional text in the warning and do the rmap cleanup. I just had an idea for softening the impact of that change: a moment's more thought may prove it's a terrible idea, but right now I like it. What if we keep the non-present pte migration throughout the deprecation period, but with a change to the where the folio_trylock() is done, and a refusal to move the charge on the page of a non-present pte, if that page/folio is currently mapped anywhere else - the folio lock preventing it from then becoming mapped while in mem_cgroup_move_account(). There's an argument that that's a better implementation anyway: that we should not interfere with others' pages; but perhaps it would turn out to be unimplementable, or would make for less predictable behaviour. Hugh