From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liu Aleaxander Subject: Re: [PATCH] vfs: does call expand_files when needed Date: Wed, 18 Nov 2009 17:37:44 +0800 Message-ID: References: <2375c9f90911172317x781e22a9y56ecb8e682e8e061@mail.gmail.com> <2375c9f90911180035v45b3f732gfe898092583a667a@mail.gmail.com> <2375c9f90911180122p19030ea2gc395030178eb706d@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Alexander Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: =?ISO-8859-1?Q?Am=E9rico_Wang?= Return-path: In-Reply-To: <2375c9f90911180122p19030ea2gc395030178eb706d@mail.gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Nov 18, 2009 at 5:22 PM, Am=E9rico Wang wrote: > On Wed, Nov 18, 2009 at 4:54 PM, Liu Aleaxander wrote: > > > >> >>>it's trivial, not so much an improvement, IMO. >> So, shouldn't we do the optimize when there is a way to do that? >> >> While, I don't think so. And BTW, it's not just a problem of >> optimization, but also make it be more sense: JUST call expand when >> need. I don't know why you are rejecting about this, especially it d= id >> optimized one call path(as you said), and it doesn't make the code >> uglier than before but making it be more sense, and, in fact, a kind >> of more readable. > > > I am not rejecting it, I said this is trivial, so accepting it or dro= ping > it both are OK for me. > > I don't think the orignal code is ugly, I didn't say the old code is ugly either. ;) >'< fdt->max_fds' is not checked for expand_files(), but for find_next_= zero_bit(). According to the old code, it's true, but it can also be applied to expand_files checking. And just like what I said, we did rarely need expand the file table as usual; even though we need, one-time expand will be enough for a long while as it doubles the original size. (Am I right?). --=20 regards Liu Aleaxander