From owner-cvs-src Sat Mar 8 23:50: 7 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A88BF37B401 for ; Sat, 8 Mar 2003 23:50:05 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 6AF5443FB1 for ; Sat, 8 Mar 2003 23:50:04 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 91330 invoked by uid 1000); 9 Mar 2003 07:50:06 -0000 Date: Sat, 8 Mar 2003 23:50:06 -0800 (PST) From: Nate Lawson To: Poul-Henning Kamp Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/sys devicestat.h In-Reply-To: <70769.1047194136@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 9 Mar 2003, Poul-Henning Kamp wrote: > In message , Nate Lawson wri > tes: > >> Revision Changes Path > >> 1.19 +14 -1 src/sys/sys/devicestat.h > > > >It would be nice to see some email on arch@ about this. There may have > >been others working on functionality in this area. > > I have floated patches recently but gotten very little response. Sorry, must have missed it. In general, I am interested in da(4) changes. > >Is there a reason for adding one element at the beginning and one at the > >end? Despite the fact this API is properly versioned, I believe accepted > >practice is to add items at the end unless other requirements supersede > >this one. > > Yes, these structures will be mmap'ed from kernel to userland and user > land will (likely) memcpy() them to private storage as snapshot'ing. > To be able to tell if you have an atomic snapshot, the two counters > must be identical. How about a mtx covering the structure and a read from the device returns the structure under lock? > To be able to do the mmap stunt, they have to be allocated from special > pages, so there is no option not to anymore. That's why there is only > one call. Ok. It's nice to see work in this area. -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message