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=-6.6 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 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 E55AFC433E1 for ; Thu, 20 Aug 2020 09:51:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B113B207FB for ; Thu, 20 Aug 2020 09:51:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B113B207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2F1C16B0075; Thu, 20 Aug 2020 05:51:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 27C678D0001; Thu, 20 Aug 2020 05:51:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 192346B007D; Thu, 20 Aug 2020 05:51:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0085.hostedemail.com [216.40.44.85]) by kanga.kvack.org (Postfix) with ESMTP id 053986B0075 for ; Thu, 20 Aug 2020 05:51:16 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B7D93BEF5 for ; Thu, 20 Aug 2020 09:51:15 +0000 (UTC) X-FDA: 77170478910.22.rub59_4103e212702f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 8952E18038E60 for ; Thu, 20 Aug 2020 09:51:15 +0000 (UTC) X-HE-Tag: rub59_4103e212702f X-Filterd-Recvd-Size: 3382 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Thu, 20 Aug 2020 09:51:14 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R611e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0U6IvpVk_1597917064; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U6IvpVk_1597917064) by smtp.aliyun-inc.com(127.0.0.1); Thu, 20 Aug 2020 17:51:05 +0800 Subject: Re: [RFC PATCH v2 4/5] mm: Split release_pages work into 3 passes To: Alexander Duyck 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 References: <20200819041852.23414.95939.stgit@localhost.localdomain> <20200819042730.23414.41309.stgit@localhost.localdomain> <15edf807-ce03-83f7-407d-5929341b2b4e@linux.alibaba.com> From: Alex Shi Message-ID: Date: Thu, 20 Aug 2020 17:49:49 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 8952E18038E60 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 Content-Transfer-Encoding: quoted-printable 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: =E5=9C=A8 2020/8/19 =E4=B8=8B=E5=8D=8810:57, Alexander Duyck =E5=86=99=E9= =81=93: >>> lruvec =3D relock_page_lruvec_irqsave(page, lruvec, &flags); >> the lock bounce is better with the patch, would you like to do further >> like using add_lruvecs to reduce bounce more? >> >> Thanks >> Alex > I'm not sure how much doing something like that would add. In my case > I had a very specific issue that this is addressing which is the fact > that every compound page was taking the LRU lock and zone lock > separately. With this patch that is reduced to one LRU lock per 15 > pages and then the zone lock per page. By adding or sorting pages by > lruvec I am not sure there will be much benefit as I am not certain > how often we will end up with pages being interleaved between multiple > lruvecs. In addition as I am limiting the quantity to a pagevec which > limits the pages to 15 I am not sure there will be much benefit to be > seen for sorting the pages beforehand. >=20 the relock will unlock and get another lock again, the cost in that, the = 2nd lock need to wait for fairness for concurrency lruvec locking. If we can do sort before, we should remove the fairness waiting here. Of = course,=20 perf result depends on scenarios. Thanks Alex