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=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_SANE_1 autolearn=ham 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 277AFC433DF for ; Sat, 4 Jul 2020 13:13:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 071E92075D for ; Sat, 4 Jul 2020 13:13:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726794AbgGDNNS (ORCPT ); Sat, 4 Jul 2020 09:13:18 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:51440 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbgGDNNR (ORCPT ); Sat, 4 Jul 2020 09:13:17 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R721e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01358;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0U1fA.Dn_1593868391; Received: from IT-FVFX43SYHV2H.lan(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U1fA.Dn_1593868391) by smtp.aliyun-inc.com(127.0.0.1); Sat, 04 Jul 2020 21:13:13 +0800 Subject: Re: [PATCH v14 15/20] mm/swap: serialize memcg changes during pagevec_lru_move_fn To: Matthew Wilcox Cc: Konstantin Khlebnikov , Andrew Morton , Mel Gorman , Tejun Heo , Hugh Dickins , =?UTF-8?B?0JrQvtC90YHRgtCw0L3RgtC40L0g0KXQu9C10LHQvdC40LrQvtCy?= , daniel.m.jordan@oracle.com, yang.shi@linux.alibaba.com, Johannes Weiner , lkp@intel.com, linux-mm@kvack.org, Linux Kernel Mailing List , Cgroups , shakeelb@google.com, Joonsoo Kim , richard.weiyang@gmail.com References: <1593752873-4493-1-git-send-email-alex.shi@linux.alibaba.com> <1593752873-4493-16-git-send-email-alex.shi@linux.alibaba.com> <56e395c6-81e7-7163-0d4f-42b91573289f@linux.alibaba.com> <20200704113944.GN25523@casper.infradead.org> From: Alex Shi Message-ID: Date: Sat, 4 Jul 2020 21:12:46 +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: <20200704113944.GN25523@casper.infradead.org> Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ÔÚ 2020/7/4 ÏÂÎç7:39, Matthew Wilcox дµÀ: > On Sat, Jul 04, 2020 at 07:34:59PM +0800, Alex Shi wrote: >> That's a great idea! Guess what the new struct we need would be like this? >> I like to try this. :) >> >> >> diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h >> index 081d934eda64..d62778c8c184 100644 >> --- a/include/linux/pagevec.h >> +++ b/include/linux/pagevec.h >> @@ -20,7 +20,7 @@ >> struct pagevec { >> unsigned char nr; >> bool percpu_pvec_drained; >> - struct page *pages[PAGEVEC_SIZE]; >> + struct list_head veclist; >> }; > > pagevecs are used not just for LRU. If you want to use a list_head for > LRU then define a new structure. > yes, there are much page don't use page->lru, like slab etc. we need a new struct. Thanks! Alex