> > well, this is a performance problem if you are using threads. For normal
> > processes there is no need for a SMP cross-call, there TLB flushes are
> > local only.
> >
> But that would be ugly as hell:
> so apache 2.0 would become slower with MSG_NOCOPY, whereas samba 2.2
> would become faster.
there *is* a cost of having a shared VM - and this is i suspect
unavoidable.
> Is is possible to move the responsibility for maitaining the copy to
> the caller?
this needs a completion event i believe.
> e.g. use msg_control, and then the caller can request either that a
> signal is sent when that data is transfered, or that a variable is set
> to 0.
i believe a signal-based thing would be the right (and scalable) solution
- the signal handler could free() the buffer.
this makes sense even in the VM-assisted MSG_NOCOPY case, since one wants
to do garbage collection of these in-flight buffers anyway. (not for
correctness but for performance reasons - free()-ing and immediately
reusing such a buffer would generate a COW.)
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/