From: Xi Wang <xi.wang@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH] af_unix: fix unix_nr_socks check in unix_create1()
Date: Sat, 25 Aug 2012 12:17:40 -0400 [thread overview]
Message-ID: <65347D45-9062-4F03-AB13-24321FF5B64A@gmail.com> (raw)
In-Reply-To: <1345876989.19483.83.camel@edumazet-glaptop>
On Aug 25, 2012, at 2:43 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> I dont think this patch is right.
>
> atomic_long_inc_return() is expensive, more than atomic_long_inc()
>
> And setting a 2^63 limit for max number of files is plain wrong,
> as there is no way a kernel can allocate 2^63 files structures.
>
> (same apply on 32bit arches, but for 2^31)
>
> If you feel you must warn a sysadmin of stupid settings, add sane
> boundaries in kernel/sysctl.c, and send your patch to lkml instead.
Yeah, I agree it's better to limit max_files in sysctl. I will send
another patch instead. Thanks.
- xi
prev parent reply other threads:[~2012-08-25 16:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-25 6:05 [PATCH] af_unix: fix unix_nr_socks check in unix_create1() Xi Wang
2012-08-25 6:43 ` Eric Dumazet
2012-08-25 16:17 ` Xi Wang [this message]
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=65347D45-9062-4F03-AB13-24321FF5B64A@gmail.com \
--to=xi.wang@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.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