Date: Mon, 17 Nov 2003 11:31:04 -0800 From: Alfred Perlstein <bright@mu.org> To: Robert Watson <rwatson@freebsd.org> Cc: fs@freebsd.org Subject: Re: open cookies Message-ID: <20031117193104.GH35957@elvis.mu.org> In-Reply-To: <Pine.NEB.3.96L.1031117130458.66398D-100000@fledge.watson.org> References: <20031117052258.GB35957@elvis.mu.org> <Pine.NEB.3.96L.1031117130458.66398D-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Robert Watson <rwatson@freebsd.org> [031117 10:13] wrote: > > On Sun, 16 Nov 2003, Alfred Perlstein wrote: > > > I'm starting to do the gruntwork of getting us per-open cookies for file > > operations. If someone can explain what needs to be done that would > > speed things up. :) > > I implemented about 90% of this previously and did not commit it. In > general, the notion of "session" corresponds well to the notion of "file > descriptor"; I found that this meant only VOPs that could be performed on > a vnode pulled out of a file descriptor were relevant. When a VOP is > dual-purpose: i.e., can be called using both "by name" and "with a > session", or even just "without a session", I used NULL for the cookie > argument to the VOP. Since we nominally support file system stacking, I > found that, much as you concluded, we needed a cookie rather than passing > struct file into each VOP, which works with the top layer but not for > lower layers. As we stuff a lower layer vnode reference into the > per-vnode state, we now have to stuff per-open state material into each > layer's per-open state. > > My general conclusion was that this over-complicated our VFS > substantially, and that the struct file state in Linux was generally used > only for multiply instantiated devices. With devfs cloning, all the cases > I was interested in (things like /dev vmware nodes) are addressed. Since > none of our non-specfs nodes required any notion of state, I found I was > touching a lot of code to minimal benefit. What's your motivation for > adding this support, and can it be added in a way that doesn't introduce > new arguments to most VOPs, and introduce a host of potential bugs? I > don't doubt it can be done right, but it's a fairly complex solution that > has to be motivated by complex requirements... I just wanted to support the way that Linux does stuff. Are you saying that it's taken care of? -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031117193104.GH35957>