[lkml]   [2008]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/7] proc: Implement support for automounts in task directories
Andrew Morton <> writes:

> On Thu, 06 Nov 2008 19:51:23 -0800 (Eric W. Biederman)
> wrote:
>> If we could do all of this with reference counting so that the
>> mount would persist exactly until the last user of it has gone
>> away without a periodic poll I would love it. But the infrastructure
>> doesn't support that today,
> Well that sucks. The free-on-last-put idiom occurs in so many places
> and serves us so well. I wonder what went wrong here?

> I guess it has interactions with dentry and inode cache aging which
> could get tricky.

At least in part. If you just have the dentry you can't easily
find what is mounted on it.

>> and where this is at least partially
>> a bug fix I would rather not have the change depend on enhancing
>> the VFS.
>> The algorithm is actually very aggressive and in practice you don't
>> see any /proc/<pid>/net showing up as a mount point.
> Do you think it has failure modes? Most particularly: obscure usage
> patterns which can cause memory exhaustion?

I don't think we can pin anything that way that we can't
pin right now.

You might be able to pin more if you happen to mount something
on top of /proc/<pid>/net/ but that is an unprivileged operation.

>> > Obviously, that becomes clearer as one spends more time with the code,
>> > but I wonder whether this has all been made as maintainble as it
>> > possibly could be.
>> Good question.
>> In the sense of will we have to go through and futz with the code all
>> of the time. The abstraction seems good. You put a mount on
>> the proc_automounts list with do_add_mounts and it goes away eventually
>> with all of the vfs rules maintained.
>> In the sense of can the code be read? Perhaps it could be better.
>> I expect it helps to have run the code and see /proc/net as a filesystem.
>> that is magically mounted.
> 'twould be a useful contribution if you were to enshrine your
> discoveries in /*these things*/. You knew I was working up to that :)

Short of a big fat comment I'm not certain if there is something I can do


 \ /
  Last update: 2008-11-07 16:59    [W:0.103 / U:0.484 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site