From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753861AbaCKQ3y (ORCPT ); Tue, 11 Mar 2014 12:29:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11306 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752357AbaCKQ3x (ORCPT ); Tue, 11 Mar 2014 12:29:53 -0400 Date: Tue, 11 Mar 2014 17:31:24 +0100 From: Alexander Gordeev To: Ming Lei Cc: Kent Overstreet , Linux Kernel Mailing List , Peter Zijlstra , Jens Axboe , "Nicholas A. Bellinger" Subject: Re: [PATCH RESEND 1/3] percpu_ida: Fix data race on cpus_have_tags cpumask Message-ID: <20140311163123.GC25564@dhcp-26-207.brq.redhat.com> References: <20140226230554.GE11655@kmo> <20140311140322.GA24065@dhcp-26-207.brq.redhat.com> 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 On Tue, Mar 11, 2014 at 11:34:21PM +0800, Ming Lei wrote: > I mean the below block can be put inside the previous lock: Oh, *now* I see what you mean. Please, ignore my prevous reply. Still, we want to release the lock as soon as possible and there is no reason to the below bits it under lock. > if (nr_free == 1) > cpumask_set_cpu() > > As I mentioned, 'nr_free == 1' doesn't happen frequently, so > it won't be big deal, will it? -- Regards, Alexander Gordeev agordeev@redhat.com