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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,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 B2463C63697 for ; Fri, 27 Nov 2020 03:15:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E2BC52222A for ; Fri, 27 Nov 2020 03:15:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2BC52222A 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 D83F06B006E; Thu, 26 Nov 2020 22:14:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D0D346B0070; Thu, 26 Nov 2020 22:14:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD8F66B0071; Thu, 26 Nov 2020 22:14:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0118.hostedemail.com [216.40.44.118]) by kanga.kvack.org (Postfix) with ESMTP id A0F276B006E for ; Thu, 26 Nov 2020 22:14:59 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 691C28249980 for ; Fri, 27 Nov 2020 03:14:59 +0000 (UTC) X-FDA: 77528731518.13.frogs55_130ecf627384 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 4D5BA18140B67 for ; Fri, 27 Nov 2020 03:14:59 +0000 (UTC) X-HE-Tag: frogs55_130ecf627384 X-Filterd-Recvd-Size: 2435 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Nov 2020 03:14:57 +0000 (UTC) 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: 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: =D4=DA 2020/11/26 =CF=C2=CE=E711:55, Matthew Wilcox =D0=B4=B5=C0: > 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 bec= omes >> 63^2, it starts to be somewhat more worrying. >> >> [1] https://lore.kernel.org/linux-mm/20201105172651.2455-1-willy@infra= dead.org/ >=20 > Well, Tim wanted it ;-) >=20 > 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. >=20 > https://en.wikipedia.org/wiki/Shellsort >=20 Uh, looks perfect good!. I gonna look into it. :) Thanks!