Re: [PATCH 2/5] fdtable: Make fdarray and fdsets equal in size.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux