Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3360305pxx; Mon, 2 Nov 2020 07:00:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHuhXuEx1VIc4Wt1uCl9ktFl37+h1hOWafHYHlOWDkrlni1JJwgHoCDELo8jjOn4le6zJc X-Received: by 2002:a17:906:3092:: with SMTP id 18mr15728064ejv.43.1604329250510; Mon, 02 Nov 2020 07:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604329250; cv=none; d=google.com; s=arc-20160816; b=CxvfrI6/f+QOCXoLGr8wsuwBDFj8+Fyz6Ugw1GPxhvXAgDiNlxM2MS298guRY9DSyw rPPrpWwLZAl53d/k9GvPLLwBKJ+X/OCViOBZg9mkuJq0je76I5udDGmBUGCwwY+QioA5 q8AP6VK2xNUT8Ev2/q7804jd+1vbDy0dulebpPGmsqrUB5k+SfcA0aTamgXKnorxZOKq s7BQxggq6lKsKvcOOb2xyJUUeHZRqHF0KhB9O54WnZFJfXDiwTFs4v88KuZ1Cj7UBoMW mPbauzRv2e9JpprbFtRCAtrolxXNDg2mNVX0lvx7mBFU99DevUdviqCXy2zC95BxkMtF IOIA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y0YbMA6MgS0VVP9wIqs606A+W5kzypLLo2uJ5yzWsp8=; b=gBhs4aZTI0H3TktKmhXBfVBRModyROgBkrX0yxNho5lG9nC5A+esZuxSGQwHOrQO7Y hWCrJDpurE4MurVRkE9wHcj976dgr7Tr97rqCa4Q4z2ScNw8H27uw6UE1Uio5LvnrtNC 7sp17G5ufLHCNNo4/G2XQjcjJDBO7xrp6VgsEATqNvP30h/fC6exHKqliTFjnC17Wbio vApk2FDC+WuhudYQeAUwmi/WPtNvZGxmw/gG8iHzqEEh67yCkSrhjgO51+7bTWNm013+ iNnMUe4LuP6E5FJskUxJw14iIk/zTh9mvuoM2zmhYF9286RFDBTyL3Ubq3OufSi5gnW4 IFJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="1vhVi/TI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g22si10092494ejx.308.2020.11.02.07.00.26; Mon, 02 Nov 2020 07:00:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="1vhVi/TI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726099AbgKBO4r (ORCPT + 99 others); Mon, 2 Nov 2020 09:56:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbgKBO4q (ORCPT ); Mon, 2 Nov 2020 09:56:46 -0500 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B5CEC061A04 for ; Mon, 2 Nov 2020 06:56:46 -0800 (PST) Received: by mail-qt1-x842.google.com with SMTP id m65so9292729qte.11 for ; Mon, 02 Nov 2020 06:56:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=y0YbMA6MgS0VVP9wIqs606A+W5kzypLLo2uJ5yzWsp8=; b=1vhVi/TIRF7BDl6cNAGmMWQ9H4M2phsWWXLUY+8VngGCC6WkJ7vRPZNIkcIgeJ9jvM 5tTwdWw/u00Bk92JyiLPxRLPS2Rt05dwhH2rAyGgzzzazKkXKAU+3yy37KckDYxXvGu3 GZhiVeifeLhbd4cl833PsnioynbYERlWVuXrFXIBcgd2bpsFgWSNHUeP+a2aaWmIwBsM OHdTBVX/zEtZSuKU+cbInOiTtXvGRVLhUq7WMVe5cyjM54irjsvZPQsyw9JOpj72PPTK +QF/D3nTqK0nO8uQF4mXTohlgqWuEJTJWWhtVyeDiMRXtO9fo0k+jSoDtfkZldv0xd0I wJ6Q== 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:message-id:references :mime-version:content-disposition:in-reply-to; bh=y0YbMA6MgS0VVP9wIqs606A+W5kzypLLo2uJ5yzWsp8=; b=uUd5czIeuJjhVqz4VOPz/5TDeqoSon3SiS6zk6dsxzLQu9ZR67K569GkmJsm8nMveZ /4em1xF+2Np1SK0qbjEaFRu/KIM1jau5sNXlQE01slg+qss2pJo8fkRGsqQBHZ1Wrbep MagAwNpOSS0GtdkYv3AojgEo+JIB4W0GabWAVtoclJQ9TCGmDq2WM6OTJiXMVo6On9eY E8FlBY6IHC+LlikSRpMTjHxxyzbyK5k7XcOMp1LTso6ZUPUnkYGwbHX4J3MYfGgf++Ta zsgXsUiJQSeESL71fQ8wM+kquVEIvm1vfITB0PV11riX2WIe5YXGp9v2exWaU2FJb1A6 3C9A== X-Gm-Message-State: AOAM530TDewyhavBFhwCopPYRgmJ+LVhPQXKDhbtEb6s22z3GHMV4ZEQ 35oK8zWSfPZsLh64t5qAQCc3PA== X-Received: by 2002:ac8:5909:: with SMTP id 9mr4991633qty.382.1604329005744; Mon, 02 Nov 2020 06:56:45 -0800 (PST) Received: from localhost ([2620:10d:c091:480::1:2f6e]) by smtp.gmail.com with ESMTPSA id k64sm8183844qkc.97.2020.11.02.06.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 06:56:45 -0800 (PST) Date: Mon, 2 Nov 2020 09:55:00 -0500 From: Johannes Weiner To: Alex Shi Cc: akpm@linux-foundation.org, mgorman@techsingularity.net, tj@kernel.org, hughd@google.com, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, willy@infradead.org, lkp@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, shakeelb@google.com, iamjoonsoo.kim@lge.com, richard.weiyang@gmail.com, kirill@shutemov.name, alexander.duyck@gmail.com, rong.a.chen@intel.com, mhocko@suse.com, vdavydov.dev@gmail.com, shy828301@gmail.com, "Kirill A. Shutemov" , Vlastimil Babka Subject: Re: [PATCH v20 13/20] mm/mlock: remove lru_lock on TestClearPageMlocked Message-ID: <20201102145500.GF724984@cmpxchg.org> References: <1603968305-8026-1-git-send-email-alex.shi@linux.alibaba.com> <1603968305-8026-14-git-send-email-alex.shi@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1603968305-8026-14-git-send-email-alex.shi@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 29, 2020 at 06:44:58PM +0800, Alex Shi wrote: > 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! > > Signed-off-by: Alex Shi > Acked-by: Hugh Dickins > Cc: Kirill A. Shutemov > Cc: Vlastimil Babka > Cc: Andrew Morton > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org Acked-by: Johannes Weiner