Received: by 10.192.165.156 with SMTP id m28csp1284988imm; Wed, 18 Apr 2018 07:18:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx49+AgnDabOue29xcTGXYZ6seTq0c5H5mD4ZxfPoPR2Bnv04gOteo4s8gmGUvKys1Xf++sUs X-Received: by 2002:a17:902:6709:: with SMTP id f9-v6mr2238802plk.159.1524061129651; Wed, 18 Apr 2018 07:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524061129; cv=none; d=google.com; s=arc-20160816; b=M2Xkt53lO2fMz97WpJs2eC1AcfY6r04nyn460kmmuk35wKgmSjX322v248+JL08trs KVlbZ9zIg7eCI1L5dxIL7hyqsbppqWLYnyibHY9pM8yEUDCPnyxitNYgDY1HK+Ci7RWP QCbR9od6gS3EDTYwHmWf323ccisgvVa+eXmY/BR11EPgwn9GghA5GfUsr3IGshBECv/D 08s7+8s5dq4N970HcvvmCCDq9Te1DksmZCiklpFW06ASzRipSU2Z4JE/4C3Na99JIQHh mJpffhWesV5JHXZPc8wdf9TvA2CwyfhK9QVQJGNPtyEMM002MWNZUJwpvS+OAHr5SNgo 3NuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:date:message-id:in-reply-to :references:from:subject:cc:to:arc-authentication-results; bh=WTOEDBi9ShVxmoCC4jT56ZSrh4U4aDp4oZTNzZQRQvQ=; b=0H0TMxKkI2I1rkqevvJLE4DAf6PHvBN4dF/oki+Mee5Y/UQb/TrjlLju13p/fT3EvL OOrLGOGZu2ppAo+t5zy+vNPbQfV1dpwjOlwxyNnYRRE8qdpcvQzyjUTnNIXAwHabXMAc 0/w9tByze18z3Fzp+oGHHBViJ2rt5TpSEtBIexMjhI/0+JuBntWwCaU7U10MK5JhxnLF kRS4tR5lGyw+n58nU6fAexzfPGatQSwXW2pGpVTo1xVnOX6/YNtD3gGHAVNfYn4VJzFE iHV3+2jDHCS3iaxNYQng+gk+oG1TbQ1FKop/X11Y06Pc7ZOMUpc1rT+8VR8SvOqAG/z7 KVOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3-v6si1319294pld.296.2018.04.18.07.18.32; Wed, 18 Apr 2018 07:18:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753107AbeDRORM (ORCPT + 99 others); Wed, 18 Apr 2018 10:17:12 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:14683 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbeDRORL (ORCPT ); Wed, 18 Apr 2018 10:17:11 -0400 Received: from fsav403.sakura.ne.jp (fsav403.sakura.ne.jp [133.242.250.102]) by www262.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id w3IEElLJ033480; Wed, 18 Apr 2018 23:14:47 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav403.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav403.sakura.ne.jp); Wed, 18 Apr 2018 23:14:47 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav403.sakura.ne.jp) Received: from AQUA (softbank126099184120.bbtec.net [126.99.184.120]) (authenticated bits=0) by www262.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id w3IEEkYu033471; Wed, 18 Apr 2018 23:14:46 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) To: ktkhai@virtuozzo.com Cc: akpm@linux-foundation.org, vdavydov.dev@gmail.com, shakeelb@google.com, viro@zeniv.linux.org.uk, hannes@cmpxchg.org, mhocko@kernel.org, tglx@linutronix.de, pombredanne@nexb.com, stummala@codeaurora.org, gregkh@linuxfoundation.org, sfr@canb.auug.org.au, guro@fb.com, mka@chromium.org, chris@chris-wilson.co.uk, longman@redhat.com, minchan@kernel.org, hillf.zj@alibaba-inc.com, ying.huang@intel.com, mgorman@techsingularity.net, jbacik@fb.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org, lirongqing@baidu.com, aryabinin@virtuozzo.com Subject: Re: [PATCH v2 01/12] mm: Assign id to every memcg-aware shrinker From: Tetsuo Handa References: <152397794111.3456.1281420602140818725.stgit@localhost.localdomain> <152399118252.3456.17590357803686895373.stgit@localhost.localdomain> In-Reply-To: <152399118252.3456.17590357803686895373.stgit@localhost.localdomain> Message-Id: <201804182314.IIG86990.MFVJSFQLFOtHOO@I-love.SAKURA.ne.jp> X-Mailer: Winbiff [Version 2.51 PL2] X-Accept-Language: ja,en,zh Date: Wed, 18 Apr 2018 23:14:45 +0900 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kirill Tkhai wrote: > The patch introduces shrinker::id number, which is used to enumerate > memcg-aware shrinkers. The number start from 0, and the code tries > to maintain it as small as possible. > > This will be used as to represent a memcg-aware shrinkers in memcg > shrinkers map. I'm not reading this thread. But is there reason "id" needs to be managed using smallest numbers? Can't we use address of shrinker object as "id" (which will be sparse bitmap, and would be managed using linked list for now)?