Re: [PATCH 00/11] Introduce kernel_clone(), kill _do_fork()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: David Laight <David.Laight@xxxxxxxxxx>
- Subject: Re: [PATCH 00/11] Introduce kernel_clone(), kill _do_fork()
- From: Matthew Wilcox <willy@xxxxxxxxxxxxx>
- Date: Wed, 19 Aug 2020 16:45:21 +0100
- Cc: "'Eric W. Biederman'" <ebiederm@xxxxxxxxxxxx>, Christian Brauner <christian.brauner@xxxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, Christoph Hewllig <hch@xxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, "linux-arch@xxxxxxxxxxxxxxx" <linux-arch@xxxxxxxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Ley Foon Tan <ley.foon.tan@xxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Stafford Horne <shorne@xxxxxxxxx>, Kars de Jong <jongk@xxxxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Greentime Hu <green.hu@xxxxxxxxx>, Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>, Alexandre Chartre <alexandre.chartre@xxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Tom Zanussi <zanussi@xxxxxxxxxx>, Xiao Yang <yangx.jy@xxxxxxxxxxxxxx>, "linux-doc@xxxxxxxxxxxxxxx" <linux-doc@xxxxxxxxxxxxxxx>, "uclinux-h8-devel@xxxxxxxxxxxxxxxxxxxx" <uclinux-h8-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "linux-m68k@xxxxxxxxxxxxxxxxxxxx" <linux-m68k@xxxxxxxxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>, "kgdb-bugreport@xxxxxxxxxxxxxxxxxxxxx" <kgdb-bugreport@xxxxxxxxxxxxxxxxxxxxx>, "linux-kselftest@xxxxxxxxxxxxxxx" <linux-kselftest@xxxxxxxxxxxxxxx>
- In-reply-to: <df7f7e17a730405ea182ec778eec22e1@AcuMS.aculab.com>
- References: <20200818173411.404104-1-christian.brauner@ubuntu.com> <20200818174447.GV17456@casper.infradead.org> <20200819074340.GW2674@hirez.programming.kicks-ass.net> <20200819084556.im5zfpm2iquzvzws@wittgenstein> <20200819111851.GY17456@casper.infradead.org> <87a6yq222c.fsf@x220.int.ebiederm.org> <20200819134629.mvd4nupme7q2hmtz@wittgenstein> <87mu2qznlv.fsf@x220.int.ebiederm.org> <df7f7e17a730405ea182ec778eec22e1@AcuMS.aculab.com>
On Wed, Aug 19, 2020 at 03:41:48PM +0000, David Laight wrote:
> Does linux have an O(1) (or do I mean o(1)) pid allocator?
> Or does it have to do a linear scan to find a gap??
O(log(n)). It uses the IDR allocator, so 'n' in this case is the
number of PIDs currently allocated, and it's log_64 rather than log_2
(which makes no difference to O() but does make a bit of a difference
to performance)
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]