From: Joseph Pingenot <trelane@digitasaru.net>
To: linux-kernel@vger.kernel.org
Subject: Max groups one can be a member of linux/sched.h and NGROUPS_SMALL
Date: Thu, 28 Oct 2004 13:02:30 -0500 [thread overview]
Message-ID: <20041028180230.GD10255@digitasaru.net> (raw)
Hello.
In my quest to try and figure out the max number of groups one can be a
member of (and to learn more about the kernel internals), I stumbled
across the following tidbit:
(excerpted from linux/sched.h)
#define NGROUPS_SMALL 32
#define NGROUPS_PER_BLOCK ((int)(PAGE_SIZE / sizeof(gid_t)))
struct group_info {
int ngroups;
atomic_t usage;
gid_t small_block[NGROUPS_SMALL];
int nblocks;
gid_t *blocks[0];
};
This seems to be the place where group information is stored (linked to from
task_struct).
So, it appears to hold 32 gids, but what is this blocks bit? Is 32 the max
number of groups one can be a member of?
Thanks!
-Joseph
--
Joseph===============================================trelane@digitasaru.net
Graduate Student in Physics, Freelance Free Software Developer
next reply other threads:[~2004-10-28 18:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-28 18:02 Joseph Pingenot [this message]
2004-10-28 18:21 ` Max groups one can be a member of linux/sched.h and NGROUPS_SMALL Tim Hockin
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=20041028180230.GD10255@digitasaru.net \
--to=trelane@digitasaru.net \
--cc=linux-kernel@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