2002-07-26 15:46:32

by Kurt Garloff

[permalink] [raw]
Subject: [PATCH] sd_many done right (4/5)

Hi,

here comes patch 4/5 from a series of patches to support more than 128 (and
optionally more than 256) SCSI disks with Linux 2.4 by changing the sd driver
to dynamically allocate memory and register block majors as disks get
attached.

The patches are all available at
http://www.suse.de/~garloff/linux/scsi-many/

When implementing sd_many, I came across prohibitive memory usang by
hd_structs which are allocated per partition. (For all partitions, not
only the existing ones.) The structure is 68 bytes (on 32bit archs) due
to all the counters there for statistics, i.e. 17k per major (thus con-
suming a 32k slab.)
One int was unused and could bye eliminated yielding a more sane size of 64
bytes. As these counters have only been introduced on 2.4.19pre, overflow
easily and are of limited use for non-kernel hackers anyway, patch 4 does
make them a config option CONFIG_BLK_STAT. You want to set it to no, in case
you want to attach many SCSI disks.

Patch is against 2.4.19rc1. Patch is independent of the others.
It could be applied right now!

Regards,
--
Kurt Garloff <[email protected]> Eindhoven, NL
GPG key: See mail header, key servers Linux kernel development
SuSE Linux AG, Nuernberg, DE SCSI, Security


Attachments:
(No filename) (0.00 B)
(No filename) (189.00 B)
Download all attachments