Hi guys,
here is updated version of the fdinfo via procfs series,
the changes from previous one are the following
- fhandle is carried inside inotify mark but this feature
is CONFIG dependent to not bloat the kernel for users
who don't need it
- a small fix in exportfs code to prevent nil dereference
the comments would be appreciated.
On Thu, Aug 23, 2012 at 02:43:23PM +0400, Cyrill Gorcunov wrote:
> Hi guys,
>
> here is updated version of the fdinfo via procfs series,
> the changes from previous one are the following
>
> - fhandle is carried inside inotify mark but this feature
> is CONFIG dependent to not bloat the kernel for users
> who don't need it
As Al points out, this doesn't help much: if this feature is something a
distro will want to provide, then in practice all their users are
eventually going to end up with it turned on.
Could you quantify the cost somehow?
I wonder if you could get away with something less than MAX_HANDLE_SIZE?
128 bytes is the maximum allowable by NFSv4. In practice I don't think
any of our filesystems need more than 40 or so right now.
--b.
>
> - a small fix in exportfs code to prevent nil dereference
>
> the comments would be appreciated.
On Thu, Aug 23, 2012 at 08:23:18AM -0400, J. Bruce Fields wrote:
> On Thu, Aug 23, 2012 at 02:43:23PM +0400, Cyrill Gorcunov wrote:
> > Hi guys,
> >
> > here is updated version of the fdinfo via procfs series,
> > the changes from previous one are the following
> >
> > - fhandle is carried inside inotify mark but this feature
> > is CONFIG dependent to not bloat the kernel for users
> > who don't need it
>
> As Al points out, this doesn't help much: if this feature is something a
> distro will want to provide, then in practice all their users are
> eventually going to end up with it turned on.
>
Yes, I remember what Al has said, the problem is that this data attached
to inotify mark is not just a couple of bytes but rather about 136 bytes
per mark, and encoding this fhandle will take some cycles on mark creation
as well. Thus when in a sake of c/r we simply have no other way and are
to pay some trade off cost for c/r functionality, i don't think the
regular users (and note that CONFIG_CHECKPOINT_RESTORE is off by default)
should pay same cost for nothing. That's why I made it config dependant.
Again if you still think that making it config-option is a bad idea I'll
rip this symbols off, it's not a problem.
> Could you quantify the cost somehow?
>
About 136 bytes per inotify mark.
> I wonder if you could get away with something less than MAX_HANDLE_SIZE?
> 128 bytes is the maximum allowable by NFSv4. In practice I don't think
> any of our filesystems need more than 40 or so right now.
Look, Bruce, I would like to follow the limits we have #define'd in kernel,
because it makes code easier to support. I can #define some limit for
inotify fhandle but what should I print in fdinfo if say there is no
space left in buffer?
Cyrill
On Thu, Aug 23, 2012 at 04:44:27PM +0400, Cyrill Gorcunov wrote:
> On Thu, Aug 23, 2012 at 08:23:18AM -0400, J. Bruce Fields wrote:
> > On Thu, Aug 23, 2012 at 02:43:23PM +0400, Cyrill Gorcunov wrote:
> > > Hi guys,
> > >
> > > here is updated version of the fdinfo via procfs series,
> > > the changes from previous one are the following
> > >
> > > - fhandle is carried inside inotify mark but this feature
> > > is CONFIG dependent to not bloat the kernel for users
> > > who don't need it
> >
> > As Al points out, this doesn't help much: if this feature is something a
> > distro will want to provide, then in practice all their users are
> > eventually going to end up with it turned on.
> >
>
> Yes, I remember what Al has said, the problem is that this data attached
> to inotify mark is not just a couple of bytes but rather about 136 bytes
> per mark, and encoding this fhandle will take some cycles on mark creation
> as well. Thus when in a sake of c/r we simply have no other way and are
> to pay some trade off cost for c/r functionality, i don't think the
> regular users (and note that CONFIG_CHECKPOINT_RESTORE is off by default)
> should pay same cost for nothing. That's why I made it config dependant.
> Again if you still think that making it config-option is a bad idea I'll
> rip this symbols off, it's not a problem.
I don't have any opinion on whether there should be a configuration
option. Just want to make sure the cost when it's turned on is still
taken seriously.
--b.
>
> > Could you quantify the cost somehow?
> >
>
> About 136 bytes per inotify mark.
>
> > I wonder if you could get away with something less than MAX_HANDLE_SIZE?
> > 128 bytes is the maximum allowable by NFSv4. In practice I don't think
> > any of our filesystems need more than 40 or so right now.
>
> Look, Bruce, I would like to follow the limits we have #define'd in kernel,
> because it makes code easier to support. I can #define some limit for
> inotify fhandle but what should I print in fdinfo if say there is no
> space left in buffer?
>
> Cyrill
On Thu, Aug 23, 2012 at 09:52:34AM -0400, J. Bruce Fields wrote:
>
> I don't have any opinion on whether there should be a configuration
> option. Just want to make sure the cost when it's turned on is still
> taken seriously.
I see. So, does the rest of series looks fine for you (except this config
moment)?
Cyrill
On Thu, Aug 23, 2012 at 05:56:06PM +0400, Cyrill Gorcunov wrote:
> On Thu, Aug 23, 2012 at 09:52:34AM -0400, J. Bruce Fields wrote:
> >
> > I don't have any opinion on whether there should be a configuration
> > option. Just want to make sure the cost when it's turned on is still
> > taken seriously.
>
> I see. So, does the rest of series looks fine for you (except this config
> moment)?
You're using the common filehandle code instead of encoding your own
from scratch, which was my only serious objection.
I haven't reviewed the rest of it carefully.
--b.
On Thu, Aug 23, 2012 at 11:25:45AM -0400, J. Bruce Fields wrote:
> On Thu, Aug 23, 2012 at 05:56:06PM +0400, Cyrill Gorcunov wrote:
> > On Thu, Aug 23, 2012 at 09:52:34AM -0400, J. Bruce Fields wrote:
> > >
> > > I don't have any opinion on whether there should be a configuration
> > > option. Just want to make sure the cost when it's turned on is still
> > > taken seriously.
> >
> > I see. So, does the rest of series looks fine for you (except this config
> > moment)?
>
> You're using the common filehandle code instead of encoding your own
> from scratch, which was my only serious objection.
>
Wait, Bruce, now I'm confused, if I understand all correctly
using common filehandle code from exportfs is preferred, or
not? What you mean by "encoding your own from scratch"? Could
you please clarify?
> I haven't reviewed the rest of it carefully.
ok
Cyrill
On Thu, Aug 23, 2012 at 04:44:27PM +0400, Cyrill Gorcunov wrote:
> On Thu, Aug 23, 2012 at 08:23:18AM -0400, J. Bruce Fields wrote:
> > On Thu, Aug 23, 2012 at 02:43:23PM +0400, Cyrill Gorcunov wrote:
> > > Hi guys,
> > >
> > > here is updated version of the fdinfo via procfs series,
> > > the changes from previous one are the following
> > >
> > > - fhandle is carried inside inotify mark but this feature
> > > is CONFIG dependent to not bloat the kernel for users
> > > who don't need it
> >
> > As Al points out, this doesn't help much: if this feature is something a
> > distro will want to provide, then in practice all their users are
> > eventually going to end up with it turned on.
> >
>
> Yes, I remember what Al has said, the problem is that this data attached
> to inotify mark is not just a couple of bytes but rather about 136 bytes
> per mark, and encoding this fhandle will take some cycles on mark creation
> as well. Thus when in a sake of c/r we simply have no other way and are
> to pay some trade off cost for c/r functionality, i don't think the
> regular users (and note that CONFIG_CHECKPOINT_RESTORE is off by default)
> should pay same cost for nothing. That's why I made it config dependant.
> Again if you still think that making it config-option is a bad idea I'll
> rip this symbols off, it's not a problem.
Btw, Bruce, I forgot to mention that Linus and Andrew asked us to wrap
all code related to c/r we bring in with CONFIG_CHECKPOINT_RESTORE symbol.
So while wrapping show_fdinfo member in file_operations with CONFIG might
be an overhead (as Al and Pavel pointed me) the fhandle in mark is reverse,
a good candidate for CONFIG wrapping I think.
Cyrill
On Thu, Aug 23, 2012 at 09:02:39PM +0400, Cyrill Gorcunov wrote:
> On Thu, Aug 23, 2012 at 11:25:45AM -0400, J. Bruce Fields wrote:
> > On Thu, Aug 23, 2012 at 05:56:06PM +0400, Cyrill Gorcunov wrote:
> > > On Thu, Aug 23, 2012 at 09:52:34AM -0400, J. Bruce Fields wrote:
> > > >
> > > > I don't have any opinion on whether there should be a configuration
> > > > option. Just want to make sure the cost when it's turned on is still
> > > > taken seriously.
> > >
> > > I see. So, does the rest of series looks fine for you (except this config
> > > moment)?
> >
> > You're using the common filehandle code instead of encoding your own
> > from scratch, which was my only serious objection.
> >
>
> Wait, Bruce, now I'm confused, if I understand all correctly
> using common filehandle code from exportfs is preferred,
Right, that's what I meant, sorry if I was unclear.
--b.
> or
> not? What you mean by "encoding your own from scratch"? Could
> you please clarify?
>
> > I haven't reviewed the rest of it carefully.
>
> ok
>
> Cyrill
On Thu, Aug 23, 2012 at 01:59:01PM -0400, J. Bruce Fields wrote:
> > > You're using the common filehandle code instead of encoding your own
> > > from scratch, which was my only serious objection.
> > >
> >
> > Wait, Bruce, now I'm confused, if I understand all correctly
> > using common filehandle code from exportfs is preferred,
>
> Right, that's what I meant, sorry if I was unclear.
I might be simply translating it wrong ;) Thanks Bruce!
Cyrill