<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&#39;ll try looking more into it.<br>
<br><span style="color: rgb(102, 51, 255);">&gt;  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&#39;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-&gt;make_request_fn (in the &quot;__generic_make_request&quot; function in the block\ll_rw_blk.c file). Till there we couldn&#39;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 &amp; Doron<br><br><div class="gmail_quote">On Thu, Sep 18, 2008 at 4:49 PM, Muli Ben-Yehuda <span dir="ltr">&lt;<a href="mailto:muli@il.ibm.com">muli@il.ibm.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Thu, Sep 18, 2008 at 12:27:36PM +0300, Doron Zuckerman wrote:<br>
<br>
&gt; I&#39;m not sure it will speed up the OS, however I&#39;m doing an academic<br>
&gt; research on the matter as part of a project I&#39;m taking, and I plan<br>
&gt; to check this point.<br>
<br>
</div>I&#39;m pretty sure it won&#39;t.&nbsp;<br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="Ih2E3d"><br>
&gt; The leading thought was that since the SSD is not a mechanical<br>
&gt; drive, pages can be brought faster in this way, and there is no need<br>
&gt; 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>
&gt; So far I found the function &quot;__generic_make_request&quot; in file<br>
&gt; &quot;ll_blk&quot;. &nbsp;This function calls a sub function named &quot;might_sleep&quot;.<br>
&gt; I have deleted the call to this function whenever I&#39;m in a<br>
&gt; pagefault, however I&#39;m not sure if this function casuses the sleep,<br>
&gt; or is just used for debugging in order to check if we entered a<br>
&gt; 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&#39;t been called in a context where<br>
you can&#39;t sleep (non-process context such as an interrupt handler).<br>
<div class="Ih2E3d"><br>
&gt; My question is if this is the function I should change in order to<br>
&gt; accept the change I&#39;m willing to get, or if the change should be<br>
&gt; made in &gt; q-&gt;make_request_fn which, according to my understanding,<br>
&gt; belongs to the specific driver I&#39;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 &#39;08)<br>
Co-located with OSDI &#39;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>