Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753470Ab3DKTwL (ORCPT ); Thu, 11 Apr 2013 15:52:11 -0400 Received: from mail-qc0-f178.google.com ([209.85.216.178]:34037 "EHLO mail-qc0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711Ab3DKTwK (ORCPT ); Thu, 11 Apr 2013 15:52:10 -0400 Date: Thu, 11 Apr 2013 12:52:03 -0700 From: Tejun Heo To: Mikulas Patocka Cc: Vivek Goyal , Jens Axboe , Mike Snitzer , Milan Broz , dm-devel@redhat.com, Andi Kleen , dm-crypt@saout.de, linux-kernel@vger.kernel.org, Christoph Hellwig , Christian Schmidt , "Alasdair G. Kergon" Subject: Re: [PATCH v2] make dm and dm-crypt forward cgroup context (was: dm-crypt parallelization patches) Message-ID: <20130411195203.GA11956@mtj.dyndns.org> References: <20130409181031.GC6186@mtj.dyndns.org> <20130409195259.GL6186@mtj.dyndns.org> <20130409210735.GR6320@redhat.com> <20130410192427.GA14911@redhat.com> <20130410235009.GI17641@mtj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 979 Lines: 24 On Thu, Apr 11, 2013 at 03:49:20PM -0400, Mikulas Patocka wrote: > If the bi_css pointer points to a structure that is shared between > processes, using atomic instruction causes cache line boucing - it doesn't > cost a few instructions, it costs 2-3 hundreds cycles. > > I modified the patch to use new flag BIO_DROP_CGROUP_REFCOUNT to note that > the refcount must be decremented - if the flag is set, refcounts must be > decremented when bio is destroyed, if it is not set, references are > borrowed from upper layer bio. > > It is less bug-prone than the previous patch. If this becomes an actual bottleneck, the right thing to do is making css ref per-cpu. Please stop messing around with refcounting. NACK. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/