[PATCH] sd_many done right (4/5)

From: Kurt Garloff (garloff@suse.de)
Date: Fri Jul 26 2002 - 10:48:41 EST


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  <garloff@suse.de>                          Eindhoven, NL
GPG key: See mail header, key servers         Linux kernel development
SuSE Linux AG, Nuernberg, DE                            SCSI, Security



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:24 EST