RE: [RFC] Direct Sockets Support??

Venkatesh Ramamurthy (Venkateshr@ami.com)
Tue, 8 May 2001 16:18:01 -0400


> But in the case of an application which fits in main memory, and
> has been running for a while (so all pages are present and
> dirty), all you'd really have to do is verify the page tables are
> in the proper state and skip the TLB flush, right?

We really cannot assume this. There are two cases
a. when a user app wants to receive some data, it allocates
memory(using malloc) and waits for the hw to do zero-copy read. The kernel
does not allocate physical page frames for the entire memory region
allocated. We need to lock the memory (and locking is expensive due to
costly TLB flushes) to do this

b. when a user app wants to send data, he fills the buffer
and waits for the hw to transmit data, but under heavy physical memory
pressure, the swapper might swap the pages we want to transmit. So we need
to lock the memory to be 100% sure.

-
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/