Re: [PATCH 2.6.18-rc1] Make group sorting optional in the 2.6.x kernels

From: Bill Ryder
Date: Tue Jul 11 2006 - 16:20:18 EST




Ray Lee wrote:
> In addition to Randy's fine comments...
>
>
>
> It seems there's a third way to do this that would maintain
> setgroups(2) compatibility and speed when you have a lot of groups.
At least for NFS which is the problem here.
>
> Maintain the list of groups such that the first sixteen correspond to
> what setgroups(2) requested, and keep the rest sorted. A search for
> groups would then linearly check each of the first sixteen entries
> then, if there's more, binary search the remainder from 16 to
> group_info->ngroups.
That's a great idea.

I'll do that instead.

And next time I won't attach the patch :-)






-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/