Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1385818pxa; Thu, 13 Aug 2020 07:34:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv3eYmtr9Rh0QbEUFSEOWbKP0t/kCWJrn2cO66IRNx2rkv49VQDqmhFSUzFgvO1QQDeZt3 X-Received: by 2002:a17:906:9618:: with SMTP id s24mr5032801ejx.53.1597329276961; Thu, 13 Aug 2020 07:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597329276; cv=none; d=google.com; s=arc-20160816; b=GzvbpKrqLezgR5U1vQW+Do/Y+5VQjhSI4AhmaG85MW8+Z5Hndsw1qGKlZiobInKOOj KdJGCiTq98zEwkGaN1iMmj+2+DurXHrGtwT3a9U+PwFWH/Pqg/0whxZ+n5YQT96vjU17 DxpzPeYYEwDH05VjUZ30O0XVlHFOSWDOED8XzcCiUCu2aQrNLiycir0FFCflWD1NE6q1 k0DQ3nn0hyTjFrOO5z9BEE8TnrAXQSVaCLEKum5dDd+KMBjxfyX2ba7/9ksC2jvSzmLj syyGJ7FlgiMB7KpFmSYndID7QqyYBvRkxMKCbLpqpiNRuFWArNw/KgD09rxTJ9JtTDLn /qaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=3t8eGrZXM10uYzb31bPcLIKkAbsLARz4dGnB5Cy2z60=; b=XIGaJP8KcZv1YN1OdOlQI+iM2OPctmAndDyLYasIEz+fOzeviGuLAqhweLTLlyMFoQ uj5518VZAgnnwL2Db4CT7WeoibshxJMpDbmrBgeJW8JZU6RHfMeEaQFDLgRVIxw7hxP4 jV9YdSBMZxe/EW7k3IJdAsByVC2lwmrn/pC8oQ7jn29bViwWQf9CXkaFReR06IyPvO4N RSNNheQuhIEQafFYxkGkNJHx3NwEh745jGKDEnyHH+H++LTA9tpYvc6L8VfX4bAfScni m1NGqtNTI2ElO6aheLC44AfaYurhyUjriK8matHVpM0CGdIU5eIEaeenMEi7Ix7KM4Jn 8P+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TWdedpVE; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si3410715eja.141.2020.08.13.07.34.13; Thu, 13 Aug 2020 07:34:36 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=TWdedpVE; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726564AbgHMOc7 (ORCPT + 99 others); Thu, 13 Aug 2020 10:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgHMOc7 (ORCPT ); Thu, 13 Aug 2020 10:32:59 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBE2FC061757; Thu, 13 Aug 2020 07:32:58 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id v6so7431111iow.11; Thu, 13 Aug 2020 07:32:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=3t8eGrZXM10uYzb31bPcLIKkAbsLARz4dGnB5Cy2z60=; b=TWdedpVEAeL5F4lIHfRmXjcM2gOol8GetJGIbvGEfn2PzRRvGuQmT9qms8dyox4tBC TV4olmsqv+0yl4gwyaxhsyMADP4gykCx7w0DeuEAK0G0iKyTcxtK409+XnpWCKn77hM9 fGLuSGnkag+rfc+u0KvKsUoGTz7XH2m7xDeTKGi6QXOlYKfSDhZe+K/6trEwSbHHWdGN on+Ef55218X7FivayasbemenUR1HH+CVbum0FuKSmuDOJ5sg5KBdBa3eiKWnW5DcE1FA Nqq/G/Qfu86pN4x96xifFsjaO08utj7p933Ow7bdiPB9+wF2p1BIdWkeFyTKPxrrVnkh 3M3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=3t8eGrZXM10uYzb31bPcLIKkAbsLARz4dGnB5Cy2z60=; b=RNbiWdL8oJYTsYa2/zcmMAyeBjuMA51XhJKcEwl7YtWE77RjdTyG7yNgwpx59SSfe7 +qRRZomBcXCEX1+x40W9cKEDJ8B96dGwVjkboEkIMtDC2eSWD7p4YUMpSsDlFz7Meg1f SDdyc3YZBmLyOt1VXSmB2+7gj1yybavySpB7d8RIrtoM62q773G/2i15QClBLLWP0620 iOHYsYki7VdSUgHOV1jOd/vmZrQrwVuWgcFMe//xiKTB4Xl9Hh0nbbnafPlqHEj/Uj5g 28Ab2DtpS/fj/TOvHuYW7pzX6WIpfOw0jXikUdzWFoMNzo1XjbivAlgCAohfK/4zcP7h z7dA== X-Gm-Message-State: AOAM533SqFpgQrdM6DnhCyUctXCnAwy+1Zqk98L3NZnXBF+HJ5OAjEyl qi29yV6/Ba6sGzFbTT+T0ilcxp3QdtMYwdyXQcA= X-Received: by 2002:a6b:da0d:: with SMTP id x13mr5199494iob.138.1597329177753; Thu, 13 Aug 2020 07:32:57 -0700 (PDT) MIME-Version: 1.0 References: <20200813035100.13054.25671.stgit@localhost.localdomain> <20200813040224.13054.96724.stgit@localhost.localdomain> <8ea9e186-b223-fb1b-5c82-2aa43c5e9f10@linux.alibaba.com> In-Reply-To: <8ea9e186-b223-fb1b-5c82-2aa43c5e9f10@linux.alibaba.com> From: Alexander Duyck Date: Thu, 13 Aug 2020 07:32:46 -0700 Message-ID: Subject: Re: [RFC PATCH 1/3] mm: Drop locked from isolate_migratepages_block To: Alex Shi Cc: Yang Shi , kbuild test robot , Rong Chen , Konstantin Khlebnikov , "Kirill A. Shutemov" , Hugh Dickins , LKML , Daniel Jordan , linux-mm , Shakeel Butt , Matthew Wilcox , Johannes Weiner , Tejun Heo , cgroups@vger.kernel.org, Andrew Morton , Wei Yang , Mel Gorman , Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 12, 2020 at 11:57 PM Alex Shi wrot= e: > > > > =E5=9C=A8 2020/8/13 =E4=B8=8B=E5=8D=8812:02, Alexander Duyck =E5=86=99=E9= =81=93: > > From: Alexander Duyck > > > > We can drop the need for the locked variable by making use of the > > lruvec_holds_page_lru_lock function. By doing this we can avoid some rc= u > > locking ugliness for the case where the lruvec is still holding the LRU > > lock associated with the page. Instead we can just use the lruvec and i= f it > > is NULL we assume the lock was released. > > > > Signed-off-by: Alexander Duyck > > --- > > mm/compaction.c | 45 ++++++++++++++++++++------------------------- > > 1 file changed, 20 insertions(+), 25 deletions(-) > > Thanks a lot! > Don't know if community is ok if we keep the patch following whole patchs= et alone? I am fine with you squashing it with another patch if you want. In theory this could probably be squashed in with the earlier patch I submitted that introduced lruvec_holds_page_lru_lock or some other patch. It is mostly just a cleanup anyway as it gets us away from needing to hold the RCU read lock in the case that we already have the correct lruvec.