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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FB5FC10F1D for ; Tue, 13 Dec 2022 14:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235563AbiLMO23 (ORCPT ); Tue, 13 Dec 2022 09:28:29 -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> 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