Messages in this thread | | | Date | Mon, 29 Sep 2003 15:43:43 -0700 | From | Tim Hockin <> | Subject | Re: [PATCH] Many groups patch. |
| |
On Mon, Sep 29, 2003 at 06:29:32PM -0400, Pete Zaitcev wrote: > >> This version drops the internal groups array (it's so often shared > >> that it's not worth it, and the logic becomes a bit neater), and does > >> vmalloc fallback in case someone has massive number of groups. > > > > Why? > > > The vmalloc space is limited, and the code just gets uglier. > > Tim was going to write a version that segments groups into > smaller arrays. I reckon it was too difficult?
I posted it once or twice then got busy. It's an array of pages. Rusty has it, but didn't believe me when I said Linus wouldn't let vmalloc() fly.
> > Have you been looking at glibc sources lately, or why do you believe that > > we should encourage insane usage? > > We have some customers who run insane number of groups, > with their own patches. This practice is popular in the > Beowulf crowd for some reason. I should note this is not > very mainstream.
I'd be ok with the simplest "kmalloc or too bad" version, but our customers wouldn't.
My version uses a struct group_info which has an array of pages. The groups are sorted and bsearched, instead of linear. The perfomance is quite good. An older version against 2.6.0-test1 or something is attached. If this method will fly, I'll take some of Rusty's good ideas and finish this version of it..
Linus? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |