Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1879036imm; Thu, 9 Aug 2018 03:40:46 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyxfdsV3WK1hrsFLsJO3D4MIujHexw8w2Ikfg0ctY3WiVibzIC5BCfzMAZZvPWuy5t2icQU X-Received: by 2002:a17:902:e20b:: with SMTP id ce11-v6mr1572626plb.136.1533811246630; Thu, 09 Aug 2018 03:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533811246; cv=none; d=google.com; s=arc-20160816; b=ezMHppVs6eKpM1FNulp5Cbb9rQ6t8ncsH4nyS7Odi1RxQQGlBmbu/YTdQ8FYlkNEMU WaEQpSOZn+/TYco8SxQCnw8G15K9jknkyfcpYqIOR9SABkY2SwDhl3Qb48vxYaGVDjbD X/B7Uv05q+jA9SlWf4X+zVRpiRNi9AwvALZXf23VqDuygmzGY+d3HjlN0xc1eH2fPH9o k4RZcbNKUAgz2aBUWr1Yb2TG+Rf6GEzKo6cvN7dZk00TdgGOXseQQq04gPCNdELqrrEL raGDCdXVzorOSc3TnBQHYrX2hhMyDwFQtZxbxIsSB5RRwo+btQ7m7qzGbtkH7wZ4Tust mfxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=PEYgolnph8jXUEhnUetq1PXsFg882CTl6hX+v8vEaV0=; b=G02HbDzPV93bnfyZPrLYCt+MPIrGABBPWIp+jKRry/Ak0UwgjTPuZRaGvrjxQ2Kymd 2F8x9gwqceYY3uBWzxvAQNuNgTejMpgek8nokdDiYub8hdsA9lHAkXIRVWRtggxKaNO5 Q9HRgLctsNKCng0Zg27DhKNsZhSkocJ1/fu3lfqWpaXuXmmNDy4QA69Arc2avO3aEFgt 0+CcF+N4Vo1wYS8cEd5Li/L3w0dsryZDm1zIHqa079W2sVctmQwsUezP4s2tKD0SiNFz Zv8l5UKndeh5EdfyY91PJZc872v7d0nrLoVR+SFpbz4IQL+o7cVBbEO/hLj/R3kMjG2p XlXQ== 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 v10-v6si6327795pfe.173.2018.08.09.03.40.30; Thu, 09 Aug 2018 03:40:46 -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 S1730190AbeHIND4 (ORCPT + 99 others); Thu, 9 Aug 2018 09:03:56 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:45278 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727768AbeHINDz (ORCPT ); Thu, 9 Aug 2018 09:03:55 -0400 Received: from fsav404.sakura.ne.jp (fsav404.sakura.ne.jp [133.242.250.103]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id w79AbbBP039809; Thu, 9 Aug 2018 19:37:38 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav404.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav404.sakura.ne.jp); Thu, 09 Aug 2018 19:37:37 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav404.sakura.ne.jp) Received: from [192.168.1.8] (softbank126074194044.bbtec.net [126.74.194.44]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id w79AbWrP039771 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 9 Aug 2018 19:37:37 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH RFC v2 02/10] mm: Make shrink_slab() lockless To: Kirill Tkhai Cc: Michal Hocko , akpm@linux-foundation.org, gregkh@linuxfoundation.org, rafael@kernel.org, viro@zeniv.linux.org.uk, darrick.wong@oracle.com, paulmck@linux.vnet.ibm.com, josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, hughd@google.com, shuah@kernel.org, robh@kernel.org, ulf.hansson@linaro.org, aspriel@gmail.com, vivek.gautam@codeaurora.org, robin.murphy@arm.com, joe@perches.com, heikki.krogerus@linux.intel.com, sfr@canb.auug.org.au, vdavydov.dev@gmail.com, chris@chris-wilson.co.uk, aryabinin@virtuozzo.com, willy@infradead.org, ying.huang@intel.com, shakeelb@google.com, jbacik@fb.com, mingo@kernel.org, mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <153365347929.19074.12509495712735843805.stgit@localhost.localdomain> <153365626605.19074.16202958374930777592.stgit@localhost.localdomain> <591d2063-0511-103d-bef6-dd35f55afe32@virtuozzo.com> <4ceb948c-7ce7-0db3-17d8-82ef1e6e47cc@virtuozzo.com> <20180809071418.GA24884@dhcp22.suse.cz> From: Tetsuo Handa Message-ID: <7b746367-e4bc-0e64-4e27-14fd7f06ba8f@i-love.sakura.ne.jp> Date: Thu, 9 Aug 2018 19:37:32 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/08/09 18:21, Kirill Tkhai wrote: > 2)SRCU. Pros are there are no the above problems; we will have completely unlocked and > scalable shrink_slab(). We will also have a possibility to avoid unregistering delays, > like I did for superblock shrinker. There will be full scalability. > Cons is enabling SRCU. > How unregistering delays can be avoided? Since you traverse all shrinkers using one shrinker_srcu, synchronize_srcu(&shrinker_srcu) will block unregistering threads until longest inflight srcu_read_lock() user calls srcu_read_unlock(). Unless you use per shrinker counter like below, I wonder whether unregistering delays can be avoided... https://marc.info/?l=linux-mm&m=151060909613004 https://marc.info/?l=linux-mm&m=151060909713005