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 A22C4C63777 for ; Fri, 27 Nov 2020 03:15:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 734092222A for ; Fri, 27 Nov 2020 03:15:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392313AbgK0DOx (ORCPT ); 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!