could this get into 2.0.31 ?

Harald Koenig (koenig@tat.physik.uni-tuebingen.de)
Tue, 26 Aug 1997 14:18:02 +0200


I know quite a number of people who have to handle data from
many strange sources with Linux boxes.

until recently, reading e.g. DAT tapes written on SGI boxes
was a major pain (read: not possible with Linux:( if people
writing these tapes didn't know that they have to limit the
max. block size for these tapes (but what if you don't know
that this tape once should be read with Linux when writing?)

now recently I got the small mail below and so far I got
2 success reports for people with this needs who tried the
hack(?) below. it works fine for them and they don't see
any bad side effects on their production machines...

is there any risk extending the blocksize[] list ?

if not, please add this to 2.0.31 so that Linux as some less
problems reading/accessing forein data.

thanks,
Harald

-----Forwarded message from Larry Janik <cyclops@ptw.com>-----

Date: Mon, 11 Aug 1997 19:39:33 -0700
To: linux-kernel@vger.rutgers.edu
From: Larry Janik <cyclops@ptw.com>
Subject: Dangerous Hack?

I needed almost a 1 Meg buffer for a DLT drive (1032192 bytes).

I changed the number of buffers in st_options.h to 1008.

I also changed the tables in kmalloc.c by adding 3 entries:

#if PAGE_SIZE == 4096
static const unsigned int blocksize[] = {
...

262144 - 16,
524288 - 16,
1048576 - 16,
0
};

static struct size_descriptor sizes[] =
{
...

{NULL, NULL, 1, 0, 0, 0, 0, 6},
{NULL, NULL, 1, 0, 0, 0, 0, 7},
{NULL, NULL, 1, 0, 0, 0, 0, 8},
{NULL, NULL, 0, 0, 0, 0, 0, 0}
};

In page_alloc.c I changed NR_MEM_LISTS from a 6 to a 9.

This hack seems to work just fine.

I tested it on 2 systems:

Kernel 2.0.27
486 dx4
24 MB Ram
Adaptec EISA 1740 SCSI interface

Kernel 2.0.27
Pentium- 166
64 MB Ram
2 PCI Adaptec 2940 SCSI Controllers

What are the drawbacks to this hack?

If they are serious, what is a better way?

Thanks!

Larry Janik <cyclops@ptw.com>

-----End of forwarded message-----

Harald

--
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^