LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: NeilBrown <neilb@suse.com>, Mike Marion <mmarion@qualcomm.com>
Cc: autofs mailing list <autofs@vger.kernel.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored
Date: Wed, 29 Nov 2017 11:14:11 +0800 [thread overview]
Message-ID: <fe6a3021-30e8-d4cd-5aa7-7f3d854cdac2@themaw.net> (raw)
In-Reply-To: <87tvxdx0jb.fsf@notabene.neil.brown.name>
On 29/11/17 10:48, NeilBrown wrote:
> On Wed, Nov 29 2017, Ian Kent wrote:
>
>> On 29/11/17 10:13, Mike Marion wrote:
>>> On Wed, Nov 29, 2017 at 12:17:27PM +1100, NeilBrown wrote:
>>>
>>>> How big do people see /proc/self/mount* getting? What size reads
>>>> does 'strace' show the various programs using to read it?
>>>
>>> We already have line counts into 5 figures. This wasn't an issue until
>>> the change of /etc/mtab to a link. The large count is due to our large
>>> direct automount maps.
>>>
>
> So .... 90,000 lines with a length of may 120 chars or about 10Meg.
> Presumably these machines would have so many gigabytes of RAM that
> caching a 10M mountinfo file would go unnoticed?
>
> Reading that in 128K chunks without generating bits on the fly will help
> a lot I suspect.
>
> We could probably ensure proper alignment by searching backwards for
> '\n' when deciding how much to return for a read.
>
>>
>> And, admittedly, the testing I was doing was with 15k+ size maps.
>>
>> Of course it's necessary to have this number of mounts to see serious
>> problems which is easiest to do with large direct mount maps.
>>
>> The thing that's different now is that before applications started
>> using /proc directly for mount table information using mount(2)
>> instead of mount(8) was enough to prevent the mount entries from
>> being added to the table seen by applications.
>
> I wonder who would notice if untriggered direct mounts quietly disappeared from
> /proc/mounts... I suspect systemd would, but there is a good chance it
> would fail-safe: assume that the mount worked.
> Alternately we could introduce /proc/self/mountinfo2 which doesn't list
> direct automounts and encourage problematic programs to use that where
> available.
Personally I think the proc filesystem tables should be a full representation
of the mounted mounts. That needs to available somewhere.
autofs still uses the proc mounts in one situation (there might be more I've
missed in eliminating this) and other applications probably do too (I have
patches to eliminate this one but they don't fit well with the current
implementation).
One approach I tried was to write a simple file system to mount over
/etc/mtab (et. al.) and filter entries returned based on simple filter
rules.
That file system is not complete by any means and I couldn't get a feel
for how effective it would be due to the direct access to the proc mount
tables done by applications.
OTOH, if applications could be persuaded to use /etc/(mtab|mounts|mountinfo)
and only consult the proc tables when absolutely necessary this pseudo file
system would be an ideal place for an entry cache ....
Ian
next prev parent reply other threads:[~2017-11-29 3:14 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-10 4:18 [PATCH 1/3] autofs - make disc device user accessible Ian Kent
2017-05-10 4:18 ` [PATCH 2/3] autofs - make dev ioctl version and ismountpoint " Ian Kent
2017-05-10 4:18 ` [PATCH 3/3] autofs - fix AT_NO_AUTOMOUNT not being honored Ian Kent
2017-05-12 12:49 ` Colin Walters
2017-11-21 1:53 ` NeilBrown
2017-11-22 4:28 ` Ian Kent
2017-11-23 0:36 ` Ian Kent
2017-11-23 2:21 ` NeilBrown
2017-11-23 2:46 ` Ian Kent
2017-11-23 3:04 ` Ian Kent
2017-11-23 4:49 ` NeilBrown
2017-11-23 6:34 ` Ian Kent
2017-11-27 16:01 ` Mike Marion
2017-11-27 23:43 ` Ian Kent
2017-11-28 0:29 ` Mike Marion
2017-11-29 1:17 ` NeilBrown
2017-11-29 2:13 ` Mike Marion
2017-11-29 2:28 ` Ian Kent
2017-11-29 2:48 ` NeilBrown
2017-11-29 3:14 ` Ian Kent [this message]
2017-11-29 2:56 ` Ian Kent
2017-11-29 3:45 ` NeilBrown
2017-11-29 6:00 ` Ian Kent
2017-11-29 7:39 ` NeilBrown
2017-11-30 0:00 ` Ian Kent
2017-11-29 16:51 ` Mike Marion
2017-11-23 0:47 ` NeilBrown
2017-11-23 1:43 ` Ian Kent
2017-11-23 2:26 ` Ian Kent
2017-11-23 3:04 ` NeilBrown
2017-11-23 3:41 ` Ian Kent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe6a3021-30e8-d4cd-5aa7-7f3d854cdac2@themaw.net \
--to=raven@themaw.net \
--cc=autofs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarion@qualcomm.com \
--cc=neilb@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).