[lkml]   [1998]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Thread implementations...

> In particular, doing a mmap() itself is fairly expensive. It implies a
> lot of bookkeeping, and it also implies a fair amount of mucking around
> with CPU VM issues (TLBs, page tables etc). In short, it can be rather
> expensive.
> Due to that expense, things that use mmap() often have a "cache" of
> mappings that they have active. Thet gets rid of one expense, but then
> there is the new expense of maintaining that cache (and it can be a
> fairly costly thing to maintain if you want to doa threaded webserver).
> In contrast, a "sendfile()" approach can be extremely light-weight, and
> threads much better because it doesn't imply the same kinds of
> maintenance.

I do not like idea of sendfile, but better proposal already walked
around here, it was something like

int copy_data_from_fd_to_fd( int fd_from, int fd_to, int length )

I think that even implementing this (the naivest possible way) might
give some performance gain becuase now you can copy big block of data
at one system call.

> Now, I'm no NT person, but I suspect that we actually do want to have a
> "sendfile()" kind of thing just because it should be fairly easy to
> implement, and would offer some interesting performance advantages for
> some cases. No, it's not truly generic, but it is useful enough in many
> circustances.

I think that copy_data_from_fd_to_fd (it needs better name) is more
powerfull than sendfile.

I'm really Pavel
Look at ;-).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to

 \ /
  Last update: 2005-03-22 13:43    [W:0.157 / U:2.512 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site