From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932730AbcHKQ3I (ORCPT ); Thu, 11 Aug 2016 12:29:08 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:32833 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932496AbcHKQ3F (ORCPT ); Thu, 11 Aug 2016 12:29:05 -0400 Date: Thu, 11 Aug 2016 12:29:01 -0400 From: Tejun Heo To: Roman Penyaev Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/1] percpu-refcount: do not forget to rcu_barrier() just before freeing Message-ID: <20160811162901.GC2695@mtj.duckdns.org> References: <20160810195539.6588-1-roman.penyaev@profitbricks.com> <20160810220932.GA2695@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Roman. On Thu, Aug 11, 2016 at 11:07:14AM +0200, Roman Penyaev wrote: > Yes, exactly, this is an illegal operation. But it is not more illegal > than calling kill() twice or reinit() when counter is not yet zero. > And those illegals are covered with warnings, which can be observed > for example with this freeze/unfreeze blk-mq bug. I have no objections about adding warnings for these conditions; however, adding rcu barrier to mask illegal usages is a very different thing. That adds a lot of unnecessary latency to the exit function and makes it unusable from non-sleepable contexts. Thanks. -- tejun