Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526316

Re: Linux 4.9-rc6

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: Linux 4.9-rc6
Date 2016-11-21 00:30 +0100
Message-ID <sFJIC-1Dt-9@gated-at.bofh.it> (permalink)
References <sFItb-Vd-1@gated-at.bofh.it> <sFIWd-182-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Linux 4.9-rc6 Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-20 23:10 +0100
  Re: Linux 4.9-rc6 Eric Dumazet <eric.dumazet@gmail.com> - 2016-11-20 23:40 +0100
    Re: Linux 4.9-rc6 Linus Torvalds <torvalds@linux-foundation.org> - 2016-11-21 00:30 +0100
      Re: Linux 4.9-rc6 Al Viro <viro@ZenIV.linux.org.uk> - 2016-11-21 02:40 +0100
        Re: Linux 4.9-rc6 Eric Dumazet <eric.dumazet@gmail.com> - 2016-11-21 06:00 +0100
          Re: Linux 4.9-rc6 David Rientjes <rientjes@google.com> - 2016-11-21 09:40 +0100
            Re: Linux 4.9-rc6 Eric Dumazet <eric.dumazet@gmail.com> - 2016-11-21 14:40 +0100
              Re: Linux 4.9-rc6 Eric Dumazet <eric.dumazet@gmail.com> - 2016-11-21 15:00 +0100
                Re: Linux 4.9-rc6 Eric Dumazet <eric.dumazet@gmail.com> - 2016-11-21 17:50 +0100

csiph-web