Messages in this thread |  | | | Date | Fri, 6 Oct 2006 12:15:41 +0530 | | From | Dipankar Sarma <> | | Subject | Re: [PATCH 2/5] fdtable: Make fdarray and fdsets equal in size. |
On Thu, Oct 05, 2006 at 09:51:04PM -0700, Vadim Lobanov wrote: > 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>
I agree with this patch in principle that it saves space and makes the lockfree fdtable code simpler. However, it would be nice if Viro or Christoph has a look at this and comment on why we always had two different sizes.
Thanks Dipankar - 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/
|  |