Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764268AbXH0V7j (ORCPT ); Mon, 27 Aug 2007 17:59:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965223AbXH0V6U (ORCPT ); Mon, 27 Aug 2007 17:58:20 -0400 Received: from phunq.net ([64.81.85.152]:53937 "EHLO moonbase.phunq.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1765103AbXH0V6R (ORCPT ); Mon, 27 Aug 2007 17:58:17 -0400 From: Daniel Phillips To: Evgeniy Polyakov Subject: Re: [1/1] Block device throttling [Re: Distributed storage.] Date: Mon, 27 Aug 2007 14:57:37 -0700 User-Agent: KMail/1.9.5 Cc: Jens Axboe , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Peter Zijlstra References: <20070731171347.GA14267@2ka.mipt.ru> <20070808095448.GA3440@2ka.mipt.ru> <20070808101708.GA23815@2ka.mipt.ru> In-Reply-To: <20070808101708.GA23815@2ka.mipt.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708271457.38100.phillips@phunq.net> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 769 Lines: 27 Say Evgeniy, something I was curious about but forgot to ask you earlier... On Wednesday 08 August 2007 03:17, Evgeniy Polyakov wrote: > ...All oerations are not atomic, since we do not care about precise > number of bios, but a fact, that we are close or close enough to the > limit. > ... in bio->endio > + q->bio_queued--; In your proposed patch, what prevents the race: cpu1 cpu2 read q->bio_queued q->bio_queued-- write q->bio_queued - 1 Whoops! We leaked a throttle count. Regards, Daniel - 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/