linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* increasing scsi_max_sg / max_segments for scsi writes/reads
@ 2005-04-10  2:35 sai narasimhamurthy
  2005-04-11  1:41 ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: sai narasimhamurthy @ 2005-04-10  2:35 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel

Hi, 
I had posted a question on increasing the scsi
read/write sectors  per command. I figured out some of
the things, but many questions still exist. 

I was wondering why the maximum writes I could get
from a single scsi write command could never exceed
204 
4096B  segments . I traced it to :  

static const int scsi_max_sg = PAGE_SIZE /
sizeof(struct scatterlist)

in scsi_merge.c .(which amounts to 204)  

Is this the limit of the maximum blocks we can
read/write through a single scsi command, atleast for
the given kernel (2.4.29) ? How can I increase
it??????

I am on a P3 Dell poweredgde 2400 . 

Sai 

  










__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: increasing scsi_max_sg / max_segments for scsi writes/reads
  2005-04-10  2:35 increasing scsi_max_sg / max_segments for scsi writes/reads sai narasimhamurthy
@ 2005-04-11  1:41 ` Randy.Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy.Dunlap @ 2005-04-11  1:41 UTC (permalink / raw)
  To: sai narasimhamurthy; +Cc: linux-scsi, linux-kernel

On Sat, 9 Apr 2005 19:35:52 -0700 (PDT) sai narasimhamurthy wrote:

| Hi, 
| I had posted a question on increasing the scsi
| read/write sectors  per command. I figured out some of
| the things, but many questions still exist. 
| 
| I was wondering why the maximum writes I could get
| from a single scsi write command could never exceed
| 204 
| 4096B  segments . I traced it to :  
| 
| static const int scsi_max_sg = PAGE_SIZE /
| sizeof(struct scatterlist)
| 
| in scsi_merge.c .(which amounts to 204)  
| 
| Is this the limit of the maximum blocks we can
| read/write through a single scsi command, atleast for
| the given kernel (2.4.29) ? How can I increase
| it??????
| 
| I am on a P3 Dell poweredgde 2400 . 

Did you read the comment immediately above that
calculation?

/*
 * scsi_malloc() can only dish out items of PAGE_SIZE or less, so we cannot
 * build a request that requires an sg table allocation of more than that.
 */

so scsi_malloc() would need some reworking to handle more.

OTOH, it appears that this is all removed in 2.6.10++, so moving to
2.6.recent is probably your best choice.

---
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: increasing scsi_max_sg / max_segments for scsi writes/reads
  2005-04-18  6:17 sai narasimhamurthy
@ 2005-04-18 14:12 ` James Bottomley
  0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2005-04-18 14:12 UTC (permalink / raw)
  To: sai narasimhamurthy; +Cc: Randy.Dunlap, SCSI Mailing List, Linux Kernel

On Sun, 2005-04-17 at 23:17 -0700, sai narasimhamurthy wrote:
> I tried working on scsi_malloc to increase burst size
> , but to no avail ..all I got was hanged system every
> time I started data transfers! 
> Has anyone worked on scsi_malloc , I am still trying
> to figure out what changes were made in 2.6 to
> overcome this problem of limited bursts. 

The change in 2.6 was to dump scsi_malloc and use mempools instead for
the sg list.

> Any pointers are very greatly welcome...I have never
> worked on this part of the code before .

Upgrade to 2.6 ... seriously ... what you're trying to do is what 2.6
was designed for.

James



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: increasing scsi_max_sg / max_segments for scsi writes/reads
@ 2005-04-18  6:17 sai narasimhamurthy
  2005-04-18 14:12 ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: sai narasimhamurthy @ 2005-04-18  6:17 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-scsi, linux-kernel

Hi , 
I tried working on scsi_malloc to increase burst size
, but to no avail ..all I got was hanged system every
time I started data transfers! 
Has anyone worked on scsi_malloc , I am still trying
to figure out what changes were made in 2.6 to
overcome this problem of limited bursts. 

Any pointers are very greatly welcome...I have never
worked on this part of the code before .


Sai










--- "Randy.Dunlap" <rddunlap@osdl.org> wrote:
> On Sat, 9 Apr 2005 19:35:52 -0700 (PDT) sai
> narasimhamurthy wrote:
> 
> | Hi, 
> | I had posted a question on increasing the scsi
> | read/write sectors  per command. I figured out
> some of
> | the things, but many questions still exist. 
> | 
> | I was wondering why the maximum writes I could get
> | from a single scsi write command could never
> exceed
> | 204 
> | 4096B  segments . I traced it to :  
> | 
> | static const int scsi_max_sg = PAGE_SIZE /
> | sizeof(struct scatterlist)
> | 
> | in scsi_merge.c .(which amounts to 204)  
> | 
> | Is this the limit of the maximum blocks we can
> | read/write through a single scsi command, atleast
> for
> | the given kernel (2.4.29) ? How can I increase
> | it??????
> | 
> | I am on a P3 Dell poweredgde 2400 . 
> 
> Did you read the comment immediately above that
> calculation?
> 
> /*
>  * scsi_malloc() can only dish out items of
> PAGE_SIZE or less, so we cannot
>  * build a request that requires an sg table
> allocation of more than that.
>  */
> 
> so scsi_malloc() would need some reworking to handle
> more.
> 
> OTOH, it appears that this is all removed in
> 2.6.10++, so moving to
> 2.6.recent is probably your best choice.
> 
> ---
> ~Randy
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-18 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-10  2:35 increasing scsi_max_sg / max_segments for scsi writes/reads sai narasimhamurthy
2005-04-11  1:41 ` Randy.Dunlap
2005-04-18  6:17 sai narasimhamurthy
2005-04-18 14:12 ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).