From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
David Miller <davem@davemloft.net>,
Stephen Hemminger <stephen@networkplumber.org>,
Network Development <netdev@vger.kernel.org>,
David Howells <dhowells@redhat.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [Bug 106241] New: shutdown(3)/close(3) behaviour is incorrect for sockets in accept(3)
Date: Fri, 30 Oct 2015 22:33:17 +0000 [thread overview]
Message-ID: <20151030223317.GK22011@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+55aFy9fPmbSCJoQiCkjkaiU2HTM6p=o-pJgiV7asyVWBjAEg@mail.gmail.com>
On Fri, Oct 30, 2015 at 02:50:46PM -0700, Linus Torvalds wrote:
> Anyway. This is a pretty simple patch, and I actually think that we
> could just get rid of the "next_fd" logic entirely with this. That
> would make this *patch* be more complicated, but it would make the
> resulting *code* be simpler.
Dropping next_fd would screw you in case of strictly sequential allocations...
Your point re power-of-two allocations is well-taken, but then I'm not
sure that kzalloc() is good enough here. Look: you have a bit for every
64 descriptors, i.e. byte per 512. On 10M case Eric had been talking
about that'll yield 32Kb worth of your secondary bitmap. It's right on
the edge of the range where vmalloc() becomes attractive; for something
bigger it gets even worse...
Currently we go for vmalloc (on bitmaps) once we are past 128K descriptors
(two bitmaps packed together => 256Kbit = 32Kb). kmalloc() is very
sensitive to size being a power of two, but IIRC vmalloc() isn't...
next prev parent reply other threads:[~2015-10-30 22:33 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201510221824.t9MIOp6n003978@room101.nl.oracle.com>
[not found] ` <20151022190701.GV22011@ZenIV.linux.org.uk>
[not found] ` <201510221951.t9MJp5LC005892@room101.nl.oracle.com>
[not found] ` <20151022215741.GW22011@ZenIV.linux.org.uk>
[not found] ` <201510230952.t9N9qYZJ021998@room101.nl.oracle.com>
[not found] ` <20151024023054.GZ22011@ZenIV.linux.org.uk>
[not found] ` <201510270908.t9R9873a001683@room101.nl.oracle.com>
[not found] ` <562F577E.6000901@oracle.com>
[not found] ` <20151027231702.GA22011@ZenIV.linux.org.uk>
[not found] ` <1445991236.7476.59.camel@edumazet-glaptop2.roam.corp.google.com>
2015-10-28 12:35 ` [Bug 106241] New: shutdown(3)/close(3) behaviour is incorrect for sockets in accept(3) Al Viro
2015-10-28 13:24 ` Eric Dumazet
2015-10-28 14:47 ` Eric Dumazet
2015-10-28 21:13 ` Al Viro
2015-10-28 21:44 ` Eric Dumazet
2015-10-28 22:33 ` Al Viro
2015-10-28 23:08 ` Eric Dumazet
2015-10-29 0:15 ` Al Viro
2015-10-29 3:29 ` Eric Dumazet
2015-10-29 4:16 ` Al Viro
2015-10-29 12:35 ` Eric Dumazet
2015-10-29 13:48 ` Eric Dumazet
2015-10-30 17:18 ` Linus Torvalds
2015-10-30 21:02 ` Al Viro
2015-10-30 21:23 ` Linus Torvalds
2015-10-30 21:50 ` Linus Torvalds
2015-10-30 22:33 ` Al Viro [this message]
2015-10-30 23:52 ` Linus Torvalds
2015-10-31 0:09 ` Al Viro
2015-10-31 15:59 ` Eric Dumazet
2015-10-31 19:34 ` Al Viro
2015-10-31 19:54 ` Linus Torvalds
2015-10-31 20:29 ` Al Viro
2015-11-02 0:24 ` Al Viro
2015-11-02 0:59 ` Linus Torvalds
2015-11-02 2:14 ` Eric Dumazet
2015-11-02 6:22 ` Al Viro
2015-10-31 20:45 ` Eric Dumazet
2015-10-31 21:23 ` Linus Torvalds
2015-10-31 21:51 ` Al Viro
2015-10-31 22:34 ` Eric Dumazet
2015-10-31 1:07 ` 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=20151030223317.GK22011@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=torvalds@linux-foundation.org \
/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).