login
Header Space

 
 

Re: Integration of SCST in the mainstream Linux kernel

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: James Bottomley <James.Bottomley@...>
Cc: Vladislav Bolkhovitin <vst@...>, Bart Van Assche <bart.vanassche@...>, Andrew Morton <akpm@...>, FUJITA Tomonori <fujita.tomonori@...>, <linux-scsi@...>, <scst-devel@...>, <linux-kernel@...>
Date: Monday, February 4, 2008 - 2:29 pm

On Mon, 4 Feb 2008, James Bottomley wrote:

mmap'ing may avoid the copy, but the overhead of a mmap operation is 
quite often much *bigger* than the overhead of a copy operation.

Please do not advocate the use of mmap() as a way to avoid memory copies. 
It's not realistic. Even if you can do it with a single "mmap()" system 
call (which is not at all a given, considering that block devices can 
easily be much larger than the available virtual memory space), the fact 
is that page table games along with the fault (and even just TLB miss) 
overhead is easily more than the cost of copying a page in a nice 
streaming manner.

Yes, memory is "slow", but dammit, so is mmap().


"data copies" is irrelevant. The only thing that matters is performance. 
And if avoiding data copies is more costly (or even of a similar cost) 
than the copies themselves would have been, there is absolutely no upside, 
and only downsides due to extra complexity.

If you want good performance for a service like this, you really generally 
*do* need to in kernel space. You can play games in user space, but you're 
fooling yourself if you think you can do as well as doing it in the 
kernel. And you're *definitely* fooling yourself if you think mmap() 
solves performance issues. "Zero-copy" does not equate to "fast". Memory 
speeds may be slower that core CPU speeds, but not infinitely so!

(That said: there *are* alternatives to mmap, like "splice()", that really 
do potentially solve some issues without the page table and TLB overheads. 
But while splice() avoids the costs of paging, I strongly suspect it would 
still have easily measurable latency issues. Switching between user and 
kernel space multiple times is definitely not going to be free, although 
it's probably not a huge issue if you have big enough requests).

		Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Wed Jan 23, 10:22 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Tue Feb 5, 3:02 pm)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Tue Feb 5, 3:02 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Tue Jan 29, 4:42 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Wed Jan 30, 7:17 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Mon Feb 4, 8:27 am)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Mon Feb 4, 11:30 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Mon Feb 4, 12:25 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Mon Feb 4, 1:06 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Mon Feb 4, 1:16 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Mon Feb 4, 1:25 pm)
Re: Integration of SCST in the mainstream Linux kernel, Linus Torvalds, (Mon Feb 4, 2:29 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Mon Feb 4, 3:06 pm)
Re: Integration of SCST in the mainstream Linux kernel, Linus Torvalds, (Mon Feb 4, 3:44 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Tue Feb 5, 3:00 pm)
Re: Integration of SCST in the mainstream Linux kernel, Matt Mackall, (Mon Feb 4, 8:07 pm)
Re: Integration of SCST in the mainstream Linux kernel, Linus Torvalds, (Mon Feb 4, 8:24 pm)
Re: Integration of SCST in the mainstream Linux kernel, Matt Mackall, (Mon Feb 4, 8:45 pm)
Re: Integration of SCST in the mainstream Linux kernel, Douglas Gilbert, (Mon Feb 4, 1:30 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Tue Feb 5, 3:01 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Tue Feb 5, 8:48 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Tue Feb 5, 8:51 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Tue Feb 5, 8:17 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Tue Feb 5, 3:21 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Tue Feb 5, 8:11 pm)
Re: [Scst-devel] Integration of SCST in the mainstream Linux..., Nicholas A. Bellinger, (Tue Feb 12, 11:44 pm)
CONFIG_SLUB and reproducable general protection faults on 2...., Nicholas A. Bellinger, (Wed Feb 13, 2:18 am)
Re: CONFIG_SLUB and reproducable general protection faults o..., Nicholas A. Bellinger, (Wed Feb 13, 12:37 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Tue Feb 5, 9:43 pm)
Re: Integration of SCST in the mainstream Linux kernel, Linus Torvalds, (Mon Feb 4, 7:27 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Mon Feb 4, 7:00 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Mon Feb 4, 7:12 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Tue Feb 5, 2:37 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Mon Feb 4, 7:16 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Mon Feb 4, 6:59 pm)
Re: Integration of SCST in the mainstream Linux kernel, J. Bruce Fields, (Mon Feb 4, 5:01 pm)
Re: Integration of SCST in the mainstream Linux kernel, Linus Torvalds, (Mon Feb 4, 5:24 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Tue Feb 5, 3:01 pm)
Re: Integration of SCST in the mainstream Linux kernel, Olivier Galibert, (Tue Feb 5, 9:05 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Tue Feb 5, 4:38 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Wed Feb 6, 6:22 am)
Re: Integration of SCST in the mainstream Linux kernel, Jeff Garzik, (Wed Feb 6, 10:21 am)
Re: Integration of SCST in the mainstream Linux kernel, Linus Torvalds, (Mon Feb 4, 7:45 pm)
Re: Integration of SCST in the mainstream Linux kernel, Linus Torvalds, (Mon Feb 4, 9:20 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Mon Feb 4, 6:00 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Mon Feb 4, 4:24 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Mon Feb 4, 3:19 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Mon Feb 4, 2:49 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Mon Feb 4, 1:56 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Mon Feb 4, 2:22 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Mon Feb 4, 2:38 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Mon Feb 4, 2:54 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Tue Feb 5, 2:59 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Tue Feb 5, 3:13 pm)
Re: [Scst-devel] Integration of SCST in the mainstream Linux..., Nicholas A. Bellinger, (Thu Feb 7, 11:38 am)
Re: [Scst-devel] Integration of SCST in the mainstream Linux..., Nicholas A. Bellinger, (Fri Feb 8, 7:53 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Fri Feb 8, 10:42 am)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Fri Feb 8, 8:00 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Fri Feb 8, 6:32 am)
Re: Integration of SCST in the mainstream Linux kernel, Luben Tuikov, (Sat Feb 9, 3:32 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Mon Feb 11, 6:02 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Thu Feb 7, 9:45 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Fri Feb 15, 11:02 am)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Fri Feb 8, 7:33 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Fri Feb 8, 10:36 am)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Fri Feb 8, 7:53 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Fri Feb 8, 6:37 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Wed Feb 6, 2:07 pm)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Mon Feb 4, 9:53 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Tue Feb 5, 12:25 pm)
Re: Integration of SCST in the mainstream Linux kernel, Linus Torvalds, (Tue Feb 5, 2:18 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Mon Feb 4, 1:08 pm)
Re: Integration of SCST in the mainstream Linux kernel, David Dillow, (Mon Feb 4, 1:00 pm)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Wed Jan 30, 4:29 am)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Wed Jan 30, 12:22 pm)
Re: [Scst-devel] Integration of SCST in the mainstream Linux..., Tomasz Chmielewski, (Tue Feb 5, 3:14 am)
Re: [Scst-devel] Integration of SCST in the mainstream Linux..., Nicholas A. Bellinger, (Tue Feb 5, 10:01 pm)
Re: [Scst-devel] Integration of SCST in the mainstream Linux..., Tomasz Chmielewski, (Tue Feb 5, 12:07 pm)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Wed Jan 30, 1:03 pm)
Re: Integration of SCST in the mainstream Linux kernel, Roland Dreier, (Tue Jan 29, 5:31 pm)
Re: Integration of SCST in the mainstream Linux kernel, FUJITA Tomonori, (Tue Jan 29, 7:32 pm)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Wed Jan 30, 7:18 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Wed Jan 30, 4:38 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Wed Feb 6, 8:16 am)
Re: Integration of SCST in the mainstream Linux kernel, Erez Zilber, (Mon Feb 18, 5:43 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Mon Feb 18, 7:01 am)
Re: Integration of SCST in the mainstream Linux kernel, Erez Zilber, (Wed Feb 20, 3:34 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Wed Feb 20, 4:41 am)
Re: Integration of SCST in the mainstream Linux kernel, Roland Dreier, (Wed Feb 6, 1:06 pm)
Re: Integration of SCST in the mainstream Linux kernel, Benny Halevy, (Wed Feb 6, 12:45 pm)
Re: Integration of SCST in the mainstream Linux kernel, James Bottomley, (Wed Jan 30, 12:34 pm)
Re: Integration of SCST in the mainstream Linux kernel, Pete Wyckoff, (Sat Feb 2, 11:32 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Wed Jan 30, 12:50 pm)
Re: Integration of SCST in the mainstream Linux kernel, FUJITA Tomonori, (Wed Jan 30, 6:56 am)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Thu Jan 31, 9:25 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Fri Feb 1, 4:11 am)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Fri Feb 1, 6:39 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Fri Feb 1, 7:04 am)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Fri Feb 1, 8:05 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Fri Feb 1, 9:25 am)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Fri Feb 1, 10:36 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Thu Jan 31, 10:34 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Thu Jan 31, 11:50 am)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Thu Jan 31, 1:14 pm)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Thu Jan 31, 1:40 pm)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Thu Jan 31, 2:15 pm)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Fri Feb 1, 5:08 am)
Re: [Scst-devel] Integration of SCST in the mainstream Linux..., Vladislav Bolkhovitin, (Fri Feb 1, 7:50 am)
Re: [Scst-devel] Integration of SCST in the mainstream Linux..., Vladislav Bolkhovitin, (Fri Feb 1, 8:25 am)
Re: [Scst-devel] Integration of SCST in the mainstream Linux..., Vladislav Bolkhovitin, (Fri Feb 1, 7:50 am)
Re: Integration of SCST in the mainstream Linux kernel, Nicholas A. Bellinger, (Thu Jan 31, 10:44 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Wed Jan 30, 9:10 am)
Re: Integration of SCST in the mainstream Linux kernel, FUJITA Tomonori, (Wed Jan 30, 9:54 am)
Re: Integration of SCST in the mainstream Linux kernel, Bart Van Assche, (Thu Jan 31, 3:48 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Wed Jan 30, 7:40 am)
Re: Integration of SCST in the mainstream Linux kernel, Vladislav Bolkhovitin, (Wed Jan 23, 1:11 pm)
speck-geostationary