From: Glen Turner <glen.turner@aarnet.edu.au>
To: Tim Hockin <thockin@hockin.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PATCH: report NGROUPS_MAX via a sysctl (read-only)
Date: Wed, 25 Feb 2004 11:29:27 +1030 [thread overview]
Message-ID: <1077670767.24730.51.camel@andromache> (raw)
In-Reply-To: <20040220071028.GA4948@hockin.org>
On Fri, 2004-02-20 at 17:40, Tim Hockin wrote:
> Well, really I don't see how apps would want to use it in any way that was
> correct.
The mere existence of the value means it can be used correctly
in application code for sanity checking.
eg:
assert(list_length(group_list) < ngroups_max());
list_append(&group_list, group);
An application might also use it to automatically
size data structure details, such as the parameters of
a hash function.
h = hash_create(ngroups_max());
Returning INT_MAX for NGROUPS_MAX isn't wrong, but you
then can't blame user space for making inefficient choices
if the kernel limit is actually smaller.
Cheers,
Glen
next prev parent reply other threads:[~2004-02-25 1:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-20 2:39 PATCH: report NGROUPS_MAX via a sysctl (read-only) Tim Hockin
2004-02-20 5:30 ` Andrew Morton
2004-02-20 6:35 ` Tim Hockin
2004-02-20 6:47 ` Andrew Morton
2004-02-20 7:10 ` Tim Hockin
2004-02-25 0:59 ` Glen Turner [this message]
2004-02-25 1:14 ` Tim Hockin
2004-02-25 7:32 ` Ulrich Drepper
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=1077670767.24730.51.camel@andromache \
--to=glen.turner@aarnet.edu.au \
--cc=linux-kernel@vger.kernel.org \
--cc=thockin@hockin.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