All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Eric Dumazet <eric.dumazet@gmail.com>, Al Viro <viro@zeniv.linux.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 4.9-rc6
Date: Sun, 20 Nov 2016 15:27:07 -0800	[thread overview]
Message-ID: <CA+55aFzpTrPgszdD32rJ=WgGjjLJ_bjvgegQuW=82phNE8kvLQ@mail.gmail.com> (raw)
In-Reply-To: <1479680873.8455.386.camel@edumazet-glaptop3.roam.corp.google.com>

On Sun, Nov 20, 2016 at 2:27 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> Hosts with ~100,000 threads have an issue with /prov/vmallocinfo
>
> It can take about 800 usec to skip over ~100,000 struct vmap_area
> in s_start(), while holding vmap_area_lock spinlock, and therefore
> blocking fork()/pthread_create().
>
> I presume we can not switch to the rbtree (vmap_area_root)
> for /proc/vmallocinfo, because this file is seek-able, right ?

Well, the good news is that the file is root-only anyway, which means
that at least it won't have the issue that a lot of other /proc files
have had - namely being opened by random user programs or libraries.

Which means that the users of it are likely fairly limited.

Which in turn means that we can probably afford to play more games
with it. Including, for example, possibly marking it non-seekable.

Or even just limit the maximum entries we are willing to walk.

Or we could decide that that file shouldn't be a seq_file at all, use
the old "one page buffer" approach that was so common for /proc files,
and make the position encode the vmalloc address in it (make the lower
PAGE_MASK bits be the offset in the line), and then we *could* just
look things up using the btree method.

Al, do you have any clever ideas?

                 Linus

  reply	other threads:[~2016-11-20 23:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-20 22:05 Linux 4.9-rc6 Linus Torvalds
2016-11-20 22:27 ` Eric Dumazet
2016-11-20 23:27   ` Linus Torvalds [this message]
2016-11-21  1:35     ` Al Viro
2016-11-21  4:59       ` Eric Dumazet
2016-11-21  8:34         ` David Rientjes
2016-11-21 13:32           ` Eric Dumazet
2016-11-21 13:51             ` Eric Dumazet
2016-11-21 16:49               ` Eric Dumazet
2016-12-04 10:43               ` Thorsten Leemhuis
     [not found]                 ` <CA+55aFzPiZW4FfWbvM-+AFraa0fkUHv4C1Y9SCzHdXEcUSPqdg@mail.gmail.com>
2016-12-04 17:17                   ` Eric Dumazet
2016-12-21 15:30                     ` Eric Dumazet

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='CA+55aFzpTrPgszdD32rJ=WgGjjLJ_bjvgegQuW=82phNE8kvLQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.