From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Davydov Subject: Re: [PATCH 2/9] slab: remove synchronous rcu_barrier() call in memcg cache release path Date: Sat, 14 Jan 2017 16:19:39 +0300 Message-ID: <20170114131939.GA2668@esperanza> References: <20170114055449.11044-1-tj@kernel.org> <20170114055449.11044-3-tj@kernel.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tarantool.org; s=mailru; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=IV/AVjBcsL+rc9lLIYAZRYtZ8i/i6bk9A0UQ7bH+T2s=; b=J0cJHgfL8gXsuShuM6//h19ppwdCR2kEFbm613Vc2hiPOfZsE2LzEGjf1fLtEuMc+ZhUNMEL74GbLH53WhkHjaEpS3ktUapKQasteWYCq/4e94QzxN4ctmQJDhQ/sMfNiGtmUcWBvuACpKFo84SxpBMDAkyHz2q0HoLrFWxIOwA=; Content-Disposition: inline In-Reply-To: <20170114055449.11044-3-tj@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Tejun Heo Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, jsvana@fb.com, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, kernel-team@fb.com Hello Tejun, Thanks a lot for looking into this issue as it seems to affect a lot of users! On Sat, Jan 14, 2017 at 12:54:42AM -0500, Tejun Heo wrote: > This patch updates the cache release path so that it simply uses > call_rcu() instead of the synchronous rcu_barrier() + custom batching. > This doesn't cost more while being logically simpler and way more > scalable. The point of rcu_barrier() is to wait until all rcu calls freeing slabs from the cache being destroyed are over (rcu_free_slab, kmem_rcu_free). I'm not sure if call_rcu() guarantees that for all rcu implementations too. If it did, why would we need rcu_barrier() at all? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750923AbdANNXp (ORCPT ); Sat, 14 Jan 2017 08:23:45 -0500 Received: from fallback3.mail.ru ([94.100.181.189]:59933 "EHLO fallback3.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbdANNXo (ORCPT ); Sat, 14 Jan 2017 08:23:44 -0500 Date: Sat, 14 Jan 2017 16:19:39 +0300 From: Vladimir Davydov To: Tejun Heo Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, jsvana@fb.com, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 2/9] slab: remove synchronous rcu_barrier() call in memcg cache release path Message-ID: <20170114131939.GA2668@esperanza> References: <20170114055449.11044-1-tj@kernel.org> <20170114055449.11044-3-tj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170114055449.11044-3-tj@kernel.org> Authentication-Results: smtp44.i.mail.ru; auth=pass smtp.auth=vdavydov@tarantool.org smtp.mailfrom=vdavydov@tarantool.org X-E1FCDC63: 05307EC0D5739F10EF47C599EBE1C77435340226AAA953E0 X-E1FCDC64: A33145855CFFB486C82359AA96D13A139533F73DE7E497E8A712FD691512CC32 X-Mailru-Sender: AA5F055C295B4E991E00E7277EE5FAA773B3B1E71B7BAC074F7BD60A8F8BE7DF372D962C34017043 X-Mras: OK Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Tejun, Thanks a lot for looking into this issue as it seems to affect a lot of users! On Sat, Jan 14, 2017 at 12:54:42AM -0500, Tejun Heo wrote: > This patch updates the cache release path so that it simply uses > call_rcu() instead of the synchronous rcu_barrier() + custom batching. > This doesn't cost more while being logically simpler and way more > scalable. The point of rcu_barrier() is to wait until all rcu calls freeing slabs from the cache being destroyed are over (rcu_free_slab, kmem_rcu_free). I'm not sure if call_rcu() guarantees that for all rcu implementations too. If it did, why would we need rcu_barrier() at all?