Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1202302pxa; Thu, 20 Aug 2020 05:31:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGzSWMRNp+Uvz5/tVbZyroFc/zuxyaumM7O/BwvO6qGzWx/GyU64sDaBoYqmxWbKsamFAp X-Received: by 2002:a17:906:b814:: with SMTP id dv20mr2388783ejb.4.1597926716446; Thu, 20 Aug 2020 05:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597926716; cv=none; d=google.com; s=arc-20160816; b=rDLwTCgFX+6eK1A47xlWVHZPGoCDvW8c8VwdCoUNYjCwOUefzwzGll0m/hDfkl3S+t nx7jMQXwlLtxBxkTg58zTAQkmCREnghR62bb9m7MVuvt2YMAX5L9tjxPldpbAIlUp0/9 xyrab/MV7tIEwZ8O1aPO6z146FpDiLwBbIXrOIVRKQNri0VnjnEkxJcm9JgTnsOI50nq /kHN5FjPNlSAnTFLROPvJ6Xv/84zV0kLojNcR9FhmZ/UrVMvhW14Wg2GyJPwiqmiX8VL WDNAEFqUJmJLod8TEg874ygwFpr5H+BnhWQEhxNU7T8OeKFw2Dc62QboNnNo9CIRaCoZ sIVQ== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=5uhCNuw9MaSPp6KQK02n2YfoK4y6ETNW+48kZMuwMjw=; b=S5ul5W0pXxgXbOrePKjdJ5EhmfpJK0aFfULyQQVvNVKv7NCsaQCB7DCMSxHtAFzvho 3RWqWqlMIcmue7TjRk85yj1x6o0Kw9JJC/1TAMOufc03S8Uw2Qf9R+yBI6DXgLu3dc1Y nYhPbjX1qyGK9kJbu4uLj20px1sWqAGYEKyb4H9R7RHyT6yEtViCB/YUwXow2mXvZzWM 2XfuT7BQkYykpagyrmB1xPbEYktMvhqeowYv1TvFaeirPGnUWiG6mXrYsSc2CI5alhw9 We1iIwhpKkJp34O3NLXG29DO9h63z58MLnBSEMRSijN53dCzmFROmoEdMcTLtkMgLc16 jciA== ARC-Authentication-Results: i=1; mx.google.com; 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x22si1122366ejc.278.2020.08.20.05.31.32; Thu, 20 Aug 2020 05:31:56 -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; 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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729986AbgHTMaw (ORCPT + 99 others); Thu, 20 Aug 2020 08:30:52 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:49010 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729791AbgHTJvL (ORCPT ); Thu, 20 Aug 2020 05:51:11 -0400 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/8/19 下午10:57, Alexander Duyck 写道: >>> lruvec = 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. > 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, perf result depends on scenarios. Thanks Alex