Patch against ll_rw_blk and blkdev.h in 2.2

From: COTTE@de.ibm.com
Date: Thu May 31 2001 - 10:04:06 EST


Hello Alan, Hi list-readers!

I'd like to suggest a change to ll_rw_blk and blkdev.h in the 2.2-Kernel:

rational
-----
On mainframe architectures, we're running a large number of disks on a
System. Our disk-device-driver (dasd) has a static major number for the
first 64 disks and uses dynamicaly allocated ones for the rest.
In ll_rw_blk there are static allocated lists (CASE_COALESCE*) for majors
that support merging requests (including our static one DASD_MAJOR).
For the dynamic allocated majors, our requests do not get clustered which
leads to a major performance drop.

the patch
-------
I added a global int field named blk_merge_rule to blkdev.h, which contains
the device driver's rule about merging. I did three definitions for this
variable: do not merge (the default), do merge, and merge but not the first
request (like for the static majors).
The device driver has to set this field for a major it uses and reset it
to BLK_MERGE_NEVER when freeing the major.
In ll_rw_blk I invented a case, which is taken if there is no static
setting
for the major. It then processes like set in blk_merge_rule.
If the device driver has a static setting for its major, it does'nt have to
care
about blk_merge_rule. If the device driverhas no static setting and does
not
set blk_merge_rule, the requests do not get merged (same as before).

I attached the patch (sorry, notes messes up white-spaces when embedding
stuff), it applies against 2.2.19. (See attached file: dyn_majors.diff)

What is your opinion about including it into the standard brach?
Why not change all block-dev-drivers so that they set blk_merge_rule and
throw out the CASE_COALESCE* stuff and simplify the code again?

mit freundlichem Gruß / with kind regards
Carsten Otte

IBM Deutschland Entwicklung GmbH
Linux for 390/zSeries Development - Device Driver Team
Phone: +49/07031/16-4076
IBM internal phone: *120-4076

--
We are Linux.
Resistance indicates that you're missing the point!


- 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 : Thu May 31 2001 - 21:00:51 EST