Re: [patch 7/8] fdmap v2 - implement sys_socket2



Davide Libenzi a écrit :
On Thu, 7 Jun 2007, Eric Dumazet wrote:

Davide, are you sure we want FIFO for non sequential allocations ?

This tends to use all the fmap slots, and not very cache friendly
if an app does a lot of [open(),...,close()] things. We already got a perf drop because of RCUification of file freeing (FIFO mode instead of LIFO given by kmalloc()/kfree())

If the idea behind this FIFO was security (ie not easy for an app to predict next glibc file handle), we/glibc might use yet another FD_SECUREMODE flag, wich ORed with O_NONSEQFD would ask to fdmap_newfd() to take the tail of fmap->slist, not head.

Uli, would it be OK to rely only on base randomization and use a LIFO instead? We have base randomization, plus LIFO does not mean strictly sequential like legacy allocator, just more compatc and cache friendly.


I am afraid randomization wont really work if /sbin/init or /bin/bash for example uses one (or more) unseq fd :
The 'random base' will be propagated at fork()/exec() time ?





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [patch 7/8] fdmap v2 - implement sys_socket2
    ... If the idea behind this FIFO was security (ie not easy for an app to ... would it be OK to rely only on base randomization and use a LIFO ... just more compatc and cache friendly. ...
    (Linux-Kernel)
  • Re: [patch 7/8] fdmap v2 - implement sys_socket2
    ... If the idea behind this FIFO was security (ie not easy for an app to predict ... would it be OK to rely only on base randomization and use a LIFO ... just more compatc and cache friendly. ...
    (Linux-Kernel)
  • Re: Technical advice needed regarding polling the database
    ... Is it safe to assume that the user is using one app to view the db while it ... decide if it should update the cache right away or at a later date. ... is frequently updating ... I am confused .What feature I should used. ...
    (microsoft.public.dotnet.general)
  • RE: [SLE] OO: If you can make it, I can break it!
    ... >then sorts the pending write operations to try minimize disk head ... >> memory to memory copy if you exit the app and then call it back up. ... the cache doesn't know about forms or any application internals. ...
    (SuSE)
  • Re: Problem with XP scheduler?
    ... it scans the desktop folder and reads all the icons. ... the files fell out of cache, ... because of lack of proper synchronization in the code. ... No matter what some app does, it should not affect the OS managed ...
    (microsoft.public.win32.programmer.kernel)