lkml.org 
[lkml]   [2007]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] ufd v1 - unsequential O(1) fdmap core
Davide Libenzi a écrit :
> Core code for the unsequential fdmap implementation. Random allocation,
> exact allocation, de-allocation and lookup are all O(1) operations.
> The only operation that is O(N) is the strict from-N-up kind of allocation,
> but that only used by F_DUPFD and it's definitely not frequently used
> (and current code is O(N) too).
> Like the "struct fdtable", the unsequential fdmap is RCU friendly too.
>
>
>

Could you please provide a diffstat ?

Me think : "Huge patch, and icache pressure for what exact gain ?"

File descriptor allocation is dust compared to socket setup costs and network
stuf. (Not speaking of close() wich is O(1) obviously)

If we want a different file descriptor allocation, why should we use a
parallel structure, and adding one level of complexity ?

Instead of finding the first zero bit in a bitmap, we could just use a cyclic
allocation, ie finding a zero bit from a 'last' position. Keeping fd_count
would help not atempting a findzerobit in the case all bits are known to be set.


-
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: 2007-06-03 23:21    [W:0.244 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site