Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8467131rwb; Tue, 13 Dec 2022 06:47:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf7I+egMl/ZoMn76+oGiggB/99QQj93WFu17L+TGBO6muvMxmQqI0w0y0czZrAlA+02xrgS3 X-Received: by 2002:a17:907:9712:b0:78d:f459:7186 with SMTP id jg18-20020a170907971200b0078df4597186mr31221280ejc.49.1670942832830; Tue, 13 Dec 2022 06:47:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670942832; cv=none; d=google.com; s=arc-20160816; b=xh/PPImf/epnwkW2PqkiBs0tqJ/5htvzr20yAca08RrGlaBzYI2/x8y+m3Jw1HB1Ws uKB1uPlLk6KS7a7pPyRpZf3PTiZPVpnb+LAaF4nwaedXM1mxZhpC+sNWp7dd4nkUmPyw tKXTHJ3oL5GE0uHLwy0XrxbKoK7Xx4KVVvqat+jXB91PXFrR9wTzXq9MVIiZIwjALjct npp9bNfp00bdsWoWjhcadm1paJHrqkT+8FwfEMas3+FO86Mr1Gm8QmQ4pBrgV2wnDr9V 0xb3StxPkXzU57eyZ/qHajLmLWVpoasSnU5MirPT29cO9olm8MdF6WCoDfPQ4N9i8klH zVQg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PXivUe4SlT51H+XkbxzD8tHS8O051eqsLitHVQp2Yh4=; b=fcIE18+Fn34S7Fd+tVuDObocsSktfOxNOEOGW6uPgzsVHyu4lKGEeHe+Ts/Kj5KKvy KgO+AQKkHZ23gpyc8u1nICn10EPMc5wFbTWGEGY3lJOV+RWjzJQ8qGm3cK08rKMQvN9r owlPYL1lKd7BPyhopV4ogySyjouVV3boWqeftzNXkhZ0Ps2mMGD/a22xYSrxMxH8KCNF ceJYtHlZHYTVRAGfvGgH9EE5Cn5NnCS8yNvxzevHpJjvhxuXoqOSJXjkm+wEJR9wJvI8 xMj4iCQUdbqlunCkDEQOniDNJVRqiiv7EJyv5XFMV2Ha2YBJUOX4ZSrhF9wzw1sDk/LP 5DVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LNENHUPh; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr5-20020a170907720500b0078e1246e7d6si7921958ejc.748.2022.12.13.06.46.55; Tue, 13 Dec 2022 06:47:12 -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=@linuxfoundation.org header.s=korg header.b=LNENHUPh; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235529AbiLMO22 (ORCPT + 72 others); Tue, 13 Dec 2022 09:28:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235278AbiLMO20 (ORCPT ); Tue, 13 Dec 2022 09:28:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7A451EAEF; Tue, 13 Dec 2022 06:28:24 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DFB7661557; Tue, 13 Dec 2022 14:28:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B8F5C433EF; Tue, 13 Dec 2022 14:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1670941703; bh=rrzaJDPWmltpz/V6l3a6Gkl9FuLfJ97cFLrnX00SHfg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LNENHUPhAT8Ebw6l5tkFIzGYdcaEZijTDBiQnLEAvwbdxNmGGQPxzp25kl2SH3ZHK F3FtyStongOr3rgWMLRImm2NUtrsQEY3O8jmFFJTRZ3dqO3dhN0vB0xE1TkETSt9gg Gaxp5+NPXEBhXMmg1zbpLP4S2KL3qykFVNP/3q9U= Date: Tue, 13 Dec 2022 15:28:19 +0100 From: Greg Kroah-Hartman To: Hugh Dickins Cc: stable@vger.kernel.org, patches@lists.linux.dev, Alex Shi , Johannes Weiner , Vlastimil Babka , "Kirill A. Shutemov" , Alexander Duyck , Andrea Arcangeli , Andrey Ryabinin , "Chen, Rong A" , Daniel Jordan , "Huang, Ying" , Jann Horn , Joonsoo Kim , "Kirill A. Shutemov" , Konstantin Khlebnikov , "Matthew Wilcox (Oracle)" , Mel Gorman , Michal Hocko , Michal Hocko , Mika =?iso-8859-1?Q?Penttil=E4?= , Minchan Kim , Shakeel Butt , Tejun Heo , Thomas Gleixner , Vladimir Davydov , Wei Yang , Yang Shi , Andrew Morton , Linus Torvalds , Sasha Levin , Gavin Shan , Zhenyu Zhang , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 5.10 001/106] mm/mlock: remove lru_lock on TestClearPageMlocked Message-ID: References: <20221212130924.863767275@linuxfoundation.org> <20221212130924.929782499@linuxfoundation.org> <8ad6ed6-5f7c-f1cd-8693-caf88bfca73a@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8ad6ed6-5f7c-f1cd-8693-caf88bfca73a@google.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Mon, Dec 12, 2022 at 12:35:57PM -0800, Hugh Dickins wrote: > On Mon, 12 Dec 2022, Greg Kroah-Hartman wrote: > > > From: Alex Shi > > > > [ Upstream commit 3db19aa39bac33f2e850fa1ddd67be29b192e51f ] > > > > In the func munlock_vma_page, comments mentained lru_lock needed for > > serialization with split_huge_pages. But the page must be PageLocked as > > well as pages in split_huge_page series funcs. Thus the PageLocked is > > enough to serialize both funcs. > > > > Further more, Hugh Dickins pointed: before splitting in > > split_huge_page_to_list, the page was unmap_page() to remove pmd/ptes > > which protect the page from munlock. Thus, no needs to guard > > __split_huge_page_tail for mlock clean, just keep the lru_lock there for > > isolation purpose. > > > > LKP found a preempt issue on __mod_zone_page_state which need change to > > mod_zone_page_state. Thanks! > > > > Link: https://lkml.kernel.org/r/1604566549-62481-13-git-send-email-alex.shi@linux.alibaba.com > > Signed-off-by: Alex Shi > > Acked-by: Hugh Dickins > > Acked-by: Johannes Weiner > > Acked-by: Vlastimil Babka > > Cc: Kirill A. Shutemov > > Cc: Alexander Duyck > > Cc: Andrea Arcangeli > > Cc: Andrey Ryabinin > > Cc: "Chen, Rong A" > > Cc: Daniel Jordan > > Cc: "Huang, Ying" > > Cc: Jann Horn > > Cc: Joonsoo Kim > > Cc: Kirill A. Shutemov > > Cc: Konstantin Khlebnikov > > Cc: Matthew Wilcox (Oracle) > > Cc: Mel Gorman > > Cc: Michal Hocko > > Cc: Michal Hocko > > Cc: Mika Penttil? > > Cc: Minchan Kim > > Cc: Shakeel Butt > > Cc: Tejun Heo > > Cc: Thomas Gleixner > > Cc: Vladimir Davydov > > Cc: Wei Yang > > Cc: Yang Shi > > Signed-off-by: Andrew Morton > > Signed-off-by: Linus Torvalds > > Stable-dep-of: 829ae0f81ce0 ("mm: migrate: fix THP's mapcount on isolation") > > Signed-off-by: Sasha Levin > > NAK from me to patches 001 through 007 here: 001 through 006 are a > risky subset of patches and followups to a per-memcg per-node lru_lock > series from Alex Shi, which made subtle changes to locking, memcg > charging, lru management, page migration etc. > > The whole series could be backported to 5.10 (I did so myself for > internal usage), but cherry-picking parts of it into 5.10-stable is > misguided and contrary to stable principles. > > Maybe there is in fact nothing wrong with the selection made: > but then give linux-mm guys two or three weeks to review and > test and give the thumbs up to that selection. > > Much easier, quicker and safer would be to adjust 007 (I presume > the reason behind 001 through 006) to fit the 5.10-stable tree: > I can do that myself if you ask, but not until later this week. All now dropped, thanks. greg k-h