From owner-svn-src-all@FreeBSD.ORG Wed Apr 14 08:06:05 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 613D31065673; Wed, 14 Apr 2010 08:06:05 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 1B0628FC1A; Wed, 14 Apr 2010 08:06:04 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 255D373098; Wed, 14 Apr 2010 10:16:30 +0200 (CEST) Date: Wed, 14 Apr 2010 10:16:30 +0200 From: Luigi Rizzo To: Pawel Jakub Dawidek , fabio@gandalf.sssup.it Message-ID: <20100414081630.GA74130@onelab2.iet.unipi.it> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> <20100412210512.GB94885@onelab2.iet.unipi.it> <20100414074616.GA1657@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100414074616.GA1657@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 08:06:05 -0000 [Cc-ing Fabio as he may have more details] On Wed, Apr 14, 2010 at 09:46:17AM +0200, Pawel Jakub Dawidek wrote: > On Mon, Apr 12, 2010 at 11:05:12PM +0200, Luigi Rizzo wrote: > > On Mon, Apr 12, 2010 at 10:49:26PM +0200, Pawel Jakub Dawidek wrote: > > ... > > > > @@ -0,0 +1,19 @@ > > > > +# GEOM_LIBRARY_PATH > > > > +# $FreeBSD$ > > > > + > > > > +.PATH: /usr/src/sbin/geom/misc > > > > + > > > > +CFLAGS += -I/usr/src/sbin/geom > > > > > > This doesn't look right. > > > > probably a leftover from older versions of this code for 6.x . > > I will do more tests tomorrow (for 7.x at this point, there is > > no point in trying to support 6.x I believe) and try to remove > > it if not necessary. > > As Rui said you should use ${.CURDIR} instead of hardcoding /usr/src/. I thought i already fixed this yesterday. > BTW. So you decided to implement insert/remove functionality after all. > I have some questions: > > - It is implemented as internal gsched hack, which is a pity, because > this might be very useful functionality for other classes in the future. > Is there a plan to make it more general and move it to the GEOM itself? yes there is such a plan -- of course if nobody has objections. In principle it is only a library extensions with no modifications to geom internals. However, when we developed that last year, we hit some corner case where removal of an active node causes either a race or (if you try to protect from the race) a livelock. Fixing this may require some small cleanup to geom internals (we discusses the issue with phk at last EuroBSDCon. Fabio may give you more details, as far as i remember the problem was that some geom code takes shortcuts instead of following a chain of pointers, and this can end up in the wrong place in case of a removal.) For this reason, at this time i am not recommending to remove a node from a chain with outstanding transactions until the issue is solved. > - Why g_sched_flush_pending() operates on global structure? I think it > will break if you try to insert and remove at the same time. i need to check this. cheers luigi