Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1159864pxu; Fri, 27 Nov 2020 00:49:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnIPI7xmZbN2LcYC6nHo28GuC3diKYRnLxbxh5C9d1M6uuV8eBlZCUCsplS4UryYfs+W/a X-Received: by 2002:a17:906:4982:: with SMTP id p2mr6630898eju.416.1606466944504; Fri, 27 Nov 2020 00:49:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606466944; cv=none; d=google.com; s=arc-20160816; b=QqeA/1V4QhRLZUgvX3kICsm9wAjG0gtU1oFuAGRvRLmBhk3FxTK5Sy9FRVKeiUEiWe mHD79ZQf1h4gxnr9HoR5iYFnsVly3vDl2VH+UCibUo5oA+lZZ7u7tM8Gj2QHaL3hPTxK GiXkwTb3qWXgqi2BZ2a2KJc+yQIoLMgr6aRVLtS92KsZtas08qPXC2j5DuQDtBoQVAI1 5uhL10IGaJqf8WfbfL44voCk5b1bOfPuIgKTXZxsGgLwlPOj/w3IIHqsehJRD61bck53 3zLcpPFIYrPtb+tkk69LVLOXcSZNFJEoPQFgFTXDB+KdIFYBm85Vougjmi9yNqPwDJZA 4QeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=yKwoTx20k2mfoGpDepvJ3iWizn5cZtneX7iLR8i4m9A=; b=F59GA0OGWiCQ9lBxEfLxaKmkUwX2BQW8VSy4hWFQBVMzxHrR7jr8N6QnPobymMmyNY A9NvdXjaAW9r4qSYmHOc1z3VpjqZJOw4eb+anLZKUDrmg1X86HcXwJBkQf3owED1AtTW Qe2cB0C90LEp6sb0N4Z7v9W5T56E5a4UwYAUmqNzyUtiWzy9eZWPOEml7nkSTJwHRy+x V7nZgTfMkKltUGvD2LdEFGJcjqXuq454pbPu8Fdul2M2/qq0+NI5zIya4q9V820CfXAB dRPJ/4fKvoKI4yz/R+GyZjgeSk/wMhSJS0AHvDrilGeX5JFk5L8LmGCkyUCJlkgzAofe 7wdA== 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 ga18si4641431ejc.519.2020.11.27.00.48.41; Fri, 27 Nov 2020 00:49:04 -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; 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 S2392309AbgK0DOx (ORCPT + 99 others); Thu, 26 Nov 2020 22:14:53 -0500 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:39752 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388682AbgK0DOx (ORCPT ); Thu, 26 Nov 2020 22:14:53 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R341e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UGeo63._1606446889; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UGeo63._1606446889) by smtp.aliyun-inc.com(127.0.0.1); Fri, 27 Nov 2020 11:14:50 +0800 Subject: Re: [PATCH next] mm/swap.c: reduce lock contention in lru_cache_add To: Matthew Wilcox , Vlastimil Babka Cc: Yu Zhao , Konstantin Khlebnikov , Andrew Morton , Hugh Dickins , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <1605860847-47445-1-git-send-email-alex.shi@linux.alibaba.com> <20201126045234.GA1014081@google.com> <20201126072402.GA1047005@google.com> <464fa387-9dfd-a8c7-3d86-040f26fd4115@suse.cz> <20201126155553.GT4327@casper.infradead.org> From: Alex Shi Message-ID: <5f8300ea-2abc-5cee-d837-f20e535f19c2@linux.alibaba.com> Date: Fri, 27 Nov 2020 11:14:49 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201126155553.GT4327@casper.infradead.org> Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2020/11/26 ????11:55, Matthew Wilcox ะด??: > On Thu, Nov 26, 2020 at 04:44:04PM +0100, Vlastimil Babka wrote: >> However, Matthew wanted to increase pagevec size [1] and once 15^2 becomes >> 63^2, it starts to be somewhat more worrying. >> >> [1] https://lore.kernel.org/linux-mm/20201105172651.2455-1-willy@infradead.org/ > > Well, Tim wanted it ;-) > > I would suggest that rather than an insertion sort (or was it a bubble > sort?), we should be using a Shell sort. It's ideal for these kinds of > smallish arrays. > > https://en.wikipedia.org/wiki/Shellsort > Uh, looks perfect good!. I gonna look into it. :) Thanks!