android_kernel_xiaomi_sm8350/arch
Vadim Lobanov bbea9f6966 [PATCH] fdtable: Make fdarray and fdsets equal in size
Currently, each fdtable supports three dynamically-sized arrays of data: the
fdarray and two fdsets.  The code allows the number of fds supported by the
fdarray (fdtable->max_fds) to differ from the number of fds supported by each
of the fdsets (fdtable->max_fdset).

In practice, it is wasteful for these two sizes to differ: whenever we hit a
limit on the smaller-capacity structure, we will reallocate the entire fdtable
and all the dynamic arrays within it, so any delta in the memory used by the
larger-capacity structure will never be touched at all.

Rather than hogging this excess, we shouldn't even allocate it in the first
place, and keep the capacities of the fdarray and the fdsets equal.  This
patch removes fdtable->max_fdset.  As an added bonus, most of the supporting
code becomes simpler.

Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:22 -08:00
..
alpha [PATCH] fdtable: Make fdarray and fdsets equal in size 2006-12-10 09:57:22 -08:00
arm [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
arm26 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
avr32 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
cris [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
frv [PATCH] sysctl: remove unused "context" param 2006-12-10 09:55:41 -08:00
h8300 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
i386 [PATCH] x86-64: no paravirt for X86_VOYAGER or X86_VISWS 2006-12-09 21:33:36 +01:00
ia64 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
m32r [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
m68k [PATCH] m68k: EXPORT_SYMBOL(cache_{clear,push}) bogus comment 2006-12-09 09:41:18 -08:00
m68knommu [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
mips [PATCH] fdtable: Make fdarray and fdsets equal in size 2006-12-10 09:57:22 -08:00
parisc [PATCH] Generic ioremap_page_range: parisc conversion 2006-12-08 08:28:52 -08:00
powerpc [PATCH] LOG2: Provide ilog2() fallbacks for powerpc 2006-12-08 08:28:51 -08:00
ppc [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
s390 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2006-12-08 11:21:55 -08:00
sh [PATCH] Generic ioremap_page_range: sh conversion 2006-12-08 08:28:52 -08:00
sh64 [PATCH] Generic ioremap_page_range: sh64 conversion 2006-12-08 08:28:52 -08:00
sparc [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
sparc64 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
um [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
v850 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
x86_64 [PATCH] sysctl: remove unused "context" param 2006-12-10 09:55:41 -08:00
xtensa [PATCH] xtensa: fix system call interface 2006-12-10 09:55:39 -08:00