<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV>q->make_request_fn <SPAN class=078125615-18092008>seem<SPAN
class=687555715-18092008>s</SPAN> to </SPAN>call a f<SPAN
class=078125615-18092008>u</SPAN>nction __make_request()<SPAN
class=687555715-18092008> [blk_init_queue_node initializes a pointer to this
function]</SPAN></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2>__make_request<SPAN
class=078125615-18092008> calls get_request_wait() <SPAN
class=687555715-18092008>which in turn calls prepare_to_wait_exclusive() and
later io_schedule().</SPAN></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=078125615-18092008></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=078125615-18092008><SPAN
class=687555715-18092008>So the logic is exactly like in 2.6.11, but a bit more
complex.</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=078125615-18092008><SPAN
class=687555715-18092008></SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=078125615-18092008><SPAN
class=687555715-18092008>Gabi</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=078125615-18092008><SPAN
class=687555715-18092008></SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=078125615-18092008></SPAN></FONT></FONT></FONT> </DIV></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> haifux-bounces@haifux.org
[mailto:haifux-bounces@haifux.org] <B>On Behalf Of </B>Doron
Zuckerman<BR><B>Sent:</B> Thursday, September 18, 2008 6:50 PM<BR><B>To:</B>
Muli Ben-Yehuda; Ronen Gruengras; haifux@haifux.org<BR><B>Subject:</B> Re:
[Haifux] SSD and linux<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>Hi Muli,<BR><BR>It seems like a good idea to check the time of a
single block read against a single context switch, we'll try looking more into
it.<BR><BR><SPAN style="COLOR: rgb(102,51,255)">> Try to find the place where
the faulting process is put to sleep</SPAN><BR
style="COLOR: rgb(102,51,255)"><SPAN style="COLOR: rgb(102,51,255)">and convert
that code to busy wait instead, terminating the busy-wait</SPAN><BR
style="COLOR: rgb(102,51,255)"><SPAN style="COLOR: rgb(102,51,255)">when the
page has been brought in.</SPAN><BR><BR>That's exactly what we are looking for,
so far with no success...<BR>We tried following the page-fault path and got all
the way to the call to q->make_request_fn (in the "__generic_make_request"
function in the block\ll_rw_blk.c file). Till there we couldn't find anything
that can put the current process into waiting. Our guess is that it is done
somewere inside this function.<BR>Do you have any idea where we can find
this?<BR><BR>Thanks,<BR><BR>Ronen & Doron<BR><BR>
<DIV class=gmail_quote>On Thu, Sep 18, 2008 at 4:49 PM, Muli Ben-Yehuda <SPAN
dir=ltr><<A href="mailto:muli@il.ibm.com">muli@il.ibm.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV class=Ih2E3d>On Thu, Sep 18, 2008 at 12:27:36PM +0300, Doron Zuckerman
wrote:<BR><BR>> I'm not sure it will speed up the OS, however I'm doing an
academic<BR>> research on the matter as part of a project I'm taking, and I
plan<BR>> to check this point.<BR><BR></DIV>I'm pretty sure it
won't. <BR></BLOCKQUOTE>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>
<DIV class=Ih2E3d><BR>> The leading thought was that since the SSD is not a
mechanical<BR>> drive, pages can be brought faster in this way, and there
is no need<BR>> to context switch, thus, avoiding the overhead
included.<BR><BR></DIV>I suggest a much simpler exercise:<BR><BR>(a) time how
long it takes to read a block of data from the SSD<BR>(b) time how long a
context switch takes<BR><BR>See that (b) is orders of magnitude faster than
(a).<BR>
<DIV class=Ih2E3d><BR>> So far I found the function
"__generic_make_request" in file<BR>> "ll_blk". This function calls a
sub function named "might_sleep".<BR>> I have deleted the call to this
function whenever I'm in a<BR>> pagefault, however I'm not sure if this
function casuses the sleep,<BR>> or is just used for debugging in order to
check if we entered a<BR>> suspend state.<BR><BR></DIV>might_sleep() is a
debugging aid, which is used by code that might<BR>sleep in order to check
that it hasn't been called in a context where<BR>you can't sleep (non-process
context such as an interrupt handler).<BR>
<DIV class=Ih2E3d><BR>> My question is if this is the function I should
change in order to<BR>> accept the change I'm willing to get, or if the
change should be<BR>> made in > q->make_request_fn which, according
to my understanding,<BR>> belongs to the specific driver I'm
using.<BR><BR></DIV>Neither. Take a look at the page fault path for a major
fault. What it<BR>does (from 10,000 feet) is initiate reading the page from
disk, and<BR>then going t sleep until the page is ready. Going to sleep in the
page<BR>fault path is what causes the context switch you want to avoid.
What<BR>you want to do instead of going to sleep is busy-wait for the<BR>data.
Try to find the place where the faulting process is put to sleep<BR>and
convert that code to busy wait instead, terminating the busy-wait<BR>when the
page has been brought in.<BR>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c><BR>Cheers,<BR>Muli<BR>--<BR>Workshop on I/O Virtualization
(WIOV '08)<BR>Co-located with OSDI '08, Dec 2008, San Diego, CA<BR><A
href="http://www.usenix.org/wiov08"
target=_blank>http://www.usenix.org/wiov08</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>