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 X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5972C433DF for ; Thu, 13 Aug 2020 14:33:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AA952078D for ; Thu, 13 Aug 2020 14:33:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TWdedpVE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726574AbgHMOc7 (ORCPT ); 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-Google-Smtp-Source: ABdhPJwfgtmbxCwJdo0mgmwrDG+x4UEu/0RCzfB6YOy8Mg4PEVKtUqPRqlJrLwfvIg901BirRGdH+47G6zM8fBc3IDg= 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. 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 X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 174C6C433DF for ; Thu, 13 Aug 2020 14:33:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B4CB02078D for ; Thu, 13 Aug 2020 14:33:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TWdedpVE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4CB02078D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5B4896B000D; Thu, 13 Aug 2020 10:33:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 564C06B000E; Thu, 13 Aug 2020 10:33:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 455F26B0010; Thu, 13 Aug 2020 10:33:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id 2DEF96B000D for ; Thu, 13 Aug 2020 10:33:05 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BB01452C5 for ; Thu, 13 Aug 2020 14:33:04 +0000 (UTC) X-FDA: 77145787488.17.slip22_1512c2c26ff4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 4C3D4180D0781 for ; Thu, 13 Aug 2020 14:33:00 +0000 (UTC) X-HE-Tag: slip22_1512c2c26ff4 X-Filterd-Recvd-Size: 4734 Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Thu, 13 Aug 2020 14:32:58 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id q75so7574565iod.1 for ; 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=mL3mDJJr77fwgrGzpq8pFfbjUQVeVO1M4UKJxrSyZtr/srK/8Z07gyKwQfMqhkrzjX Az6PHibFbJy2own16UwRTyZaUsv8zVhxLX3h/oz3IZT3G2vcUcDsm8aVewY8yjX7agXA ilXpSysoWeqKblEuUFoGzjNHJCEna1MW4c4JZAc6IqlqpDtOOWj7aePbFZY2kU5UbtJa vRdCZf2SJZyjCwKuSdxxNMKKT1SynaFwHi2Y2BsjsQVGP11cWlyEsLHirsvkzZA2Xr3d ZvM6FN4uCWpVZdWQBq1a+Nsnc3UN6Ow3GwkUqNtpF0IPiES+jfaL/PhQa+qV5aIcPn0I rtRA== X-Gm-Message-State: AOAM530EmqS4VnJeYK6QD0SHh8akUnsmp6Y61rtoncQMU8KELJcRY7A0 zXaIn0O0w3lsRmgK7ps/lJaAA9TFX/0SC/oOIiw= X-Google-Smtp-Source: ABdhPJwfgtmbxCwJdo0mgmwrDG+x4UEu/0RCzfB6YOy8Mg4PEVKtUqPRqlJrLwfvIg901BirRGdH+47G6zM8fBc3IDg= 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 X-Rspamd-Queue-Id: 4C3D4180D0781 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Duyck Subject: Re: [RFC PATCH 1/3] mm: Drop locked from isolate_migratepages_block Date: Thu, 13 Aug 2020 07:32:46 -0700 Message-ID: References: <20200813035100.13054.25671.stgit@localhost.localdomain> <20200813040224.13054.96724.stgit@localhost.localdomain> <8ea9e186-b223-fb1b-5c82-2aa43c5e9f10@linux.alibaba.com> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: 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== In-Reply-To: <8ea9e186-b223-fb1b-5c82-2aa43c5e9f10-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="utf-8" 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Wei Yang , Mel Gorman , Joonsoo Kim 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.