lkml.org 
[lkml]   [2009]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] vfs: does call expand_files when needed
From
On Wed, Nov 18, 2009 at 5:22 PM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
> On Wed, Nov 18, 2009 at 4:54 PM, Liu Aleaxander <aleaxander@gmail.com> wrote:
>
> <snip>
>
>>
>>>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 did
>> 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 droping
> 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?).



--
regards
Liu Aleaxander
--
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/

\
 
 \ /
  Last update: 2009-11-18 10:41    [W:0.037 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site