Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* SCSI Tape Blocking
@ 1999-07-17 15:40 Wes Bauske
  1999-07-18  7:13 ` Wes Bauske
  0 siblings, 1 reply; 2+ messages in thread
From: Wes Bauske @ 1999-07-17 15:40 UTC (permalink / raw)
  To: axp-list@redhat.com


I just received some DLT tapes from another company
that were written on Sun Solaris with approximately
12MB physical block size. I tried to read them with
Linux on my Alpha but Linux fails with the messge

"dd: /dev/st0: Value too large for defined data type"

dmesg shows:

st: failed to enlarge buffer to 11987040 bytes.

It seems Linux is running into a limit on the order of 2MB
from my other testing.

I looked a bit at the code and I think a kmalloc()
for that size failed, or, possibly it tried to get a
DMA region that large. Anyone have any ideas how to
get the tape read?

Any advice is appreciated.


Wes


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

* Re: SCSI Tape Blocking
  1999-07-17 15:40 SCSI Tape Blocking Wes Bauske
@ 1999-07-18  7:13 ` Wes Bauske
  0 siblings, 0 replies; 2+ messages in thread
From: Wes Bauske @ 1999-07-18  7:13 UTC (permalink / raw)
  To: axp-list

Wes Bauske wrote:
> 
> I just received some DLT tapes from another company
> that were written on Sun Solaris with approximately
> 12MB physical block size. I tried to read them with
> Linux on my Alpha but Linux fails with the messge
> 
> "dd: /dev/st0: Value too large for defined data type"
> 
> dmesg shows:
> 
> st: failed to enlarge buffer to 11987040 bytes.
> 
> It seems Linux is running into a limit on the order of 2MB
> from my other testing.
> 
> I looked a bit at the code and I think a kmalloc()
> for that size failed, or, possibly it tried to get a
> DMA region that large. Anyone have any ideas how to
> get the tape read?
> 

The problem is in mm/page_alloc.c

A define for NR_MEM_LISTS with a value of 6 is too small
to allocate sufficient memory for the st device driver.
All you have to do is set NR_MEM_LISTS to 7 or more. I set
it to 8 and rebuilt my kernel and it works like a champ
so far. I'm a gigabyte into the tape and it's still 
chunking along. I believe I can now go to 32MB blocks
assuming I understand how it all works.

Anyone know if setting this define larger causes trouble
anywhere else?? It appears it controls the number and allowed 
size of the memory pool chunks. By increasing it from 6 to 8
I'm allowing chunks 2x and 4x larger than the previous max.
The term used is the "order" of the chunk which seems to be
just the size requested rounded to a page size times a power
of 2.

Another alternative is to change the number of scatter/gather
buffers in st.c to allow more than 16 segments. Either way 
allows st.c to allocate sufficient space to do the large tape
blocks. Perhaps modifying st.c is preferable to mucking with
page_alloc.c assuming there is no issue with using more than
16 s/g segments.


Wes


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

end of thread, other threads:[~1999-07-18  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-17 15:40 SCSI Tape Blocking Wes Bauske
1999-07-18  7:13 ` Wes Bauske

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox