Hi Mike,

Thank you for the super prompt reply. I actually downloaded that book
a while but never read. I'm gonna start reading right away. Thanks a
lot for telling me.

Two more questions about open-iscsi implementaion though..

1. As you mentioned in a previous reply, open-iscsi only supports one
page in one sg entry, is there any specific reason behind that? and
would it be possible to enable " scsi_host_template::use_clustering"?

2. I looked at the way sendpage() is used in iscsi_tcp.c and it seems
like we are sending one sg entry per sendpage() call. I was wondering
would it possible to send more than one sg entries per at one time,
say we copy a few pages to one buffer fist and then send out that
buffer through sendpage()?

Thank you very much.

Jack


On May 6, 3:08 pm, Mike Christie <micha...@cs.wisc.edu> wrote:
> On 05/06/2010 03:53 PM, Jack Z wrote:
>
> > Hi Mike,
>
> > Thanks for your reply.
>
> > What I was doing was just trying to understand how the the data
> > travels through normal fs or block layer, reaches iscsi and gets sent
> > over the network, when there is a normal read()/write() request. So
> > the function call trace I have found is not quite the normal path?
>
> Yeah, it is the passthrough one.  But once it gets to the iscsi layer's
> iscsi_queuecommand function it is all the same.
>
> > Actually I'm still new to the kernel and the storage subsystem... So
> > could you maybe tell me what I should look at to learn more about the
> > normal code path of a read/write request? Or maybe point me to some
> > online materials/books I can gain some understanding from?
>
> Do you have the Linux Device Driver book? It is 
> free:http://lwn.net/Kernel/LDD3/. Chapter 16 starting with the section
> Request Processing might be helpful. It might be a little dated, but the
> bio to request processing and a lot of the request and request queue
> processing is close. I think it can be used to help find a function in
> the current kernel and from there it seems like you can figure out where
> things are going.
>
>
>
> > Thanks a lot!
>
> > Jack
>
> > On May 6, 10:56 am, Mike Christie<micha...@cs.wisc.edu>  wrote:
> >> On 05/05/2010 10:26 PM, Jack Z wrote:
>
> >>> Hi Mike,
>
> >>> Thank you for your help again. Following the guidance in your reply, I
> >>> traced the kernel code a bit more and eventually found out a possible
> >>> path for open-iscsi to get 4K pages in the scatterlist.
>
> >>> Kernel version: 2.6.30
> >>> open-iscsi version: 2.0.871
>
> >>> Trace 1: SCSI from a write request to data written into pages
>
> >>> -->   function pointer
>
> >>> sg_fops.write -->   sg_write()
>
> >> Just so you know, this is the passthrough path. You are using some tools
> >> like sg_utils or doing SG IO right?
>
> >> What I described might be a little different than this path. I was
> >> describing the normal FS/Block layer code path (like when you do a
> >> read()/write() to /dev/sda or to some file on a FS on /dev/sda).
>
> >> --
> >> You received this message because you are subscribed to the Google Groups 
> >> "open-iscsi" group.
> >> To post to this group, send email to open-is...@googlegroups.com.
> >> To unsubscribe from this group, send email to 
> >> open-iscsi+unsubscr...@googlegroups.com.
> >> For more options, visit this group 
> >> athttp://groups.google.com/group/open-iscsi?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "open-iscsi" group.
> To post to this group, send email to open-is...@googlegroups.com.
> To unsubscribe from this group, send email to 
> open-iscsi+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/open-iscsi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to