public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Vadim Lobanov <vlobanov@speakeasy.net>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] fdtable: Make fdarray and fdsets equal in size.
Date: Fri, 6 Oct 2006 12:15:41 +0530	[thread overview]
Message-ID: <20061006064541.GA6751@in.ibm.com> (raw)
In-Reply-To: <200610052151.04490.vlobanov@speakeasy.net>

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

  reply	other threads:[~2006-10-06  6:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06  4:51 [PATCH 2/5] fdtable: Make fdarray and fdsets equal in size Vadim Lobanov
2006-10-06  6:45 ` Dipankar Sarma [this message]
2006-10-10 17:12 ` Eric Dumazet
2006-10-10 18:36   ` Vadim Lobanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061006064541.GA6751@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vlobanov@speakeasy.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox