From: Guest section DW <dwguest@win.tue.nl>
To: Martin Wilck <Martin.Wilck@fujitsu-siemens.com>
Cc: Linux Kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] wrong disk index in /proc/stat
Date: Tue, 26 Jun 2001 17:49:42 +0200 [thread overview]
Message-ID: <20010626174942.A24389@win.tue.nl> (raw)
In-Reply-To: <20010626045614.A24248@win.tue.nl> <Pine.LNX.4.30.0106261605200.13052-100000@biker.pdb.fsc.net>
In-Reply-To: <Pine.LNX.4.30.0106261605200.13052-100000@biker.pdb.fsc.net>; from Martin Wilck on Tue, Jun 26, 2001 at 04:07:33PM +0200
On Tue, Jun 26, 2001 at 04:07:33PM +0200, Martin Wilck wrote:
> > static inline unsigned int disk_index (kdev_t dev)
> > {
> > struct gendisk *g = get_gendisk(dev);
> > return g ? (MINOR(dev) >> g->minor_shift) : 0;
> > }
>
> Well,
>
> a) this is not in the official kernel,
> b) the original genhd.h says that's too slow (is it really slower?)
Ad a): true.
Ad b): if you only make this change then it will be faster or slower
depending on how many disks you have (because get_gendisk() used
to be a linear search through a list that has as length the number
of disk majors); however, my get_gendisk today is
static inline struct gendisk *
get_gendisk(kdev_t dev) {
return blk_gendisk[MAJOR(dev)];
}
hence is faster.
Andries
[go to ftp://ftp.XX.kernel.org/pub/linux/kernel/people/aeb/ or so
and get patches 01*, 02*, ... and apply them successively to 2.4.6pre5.
complain to aeb@cwi.nl if anything is wrong]
next prev parent reply other threads:[~2001-06-26 15:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-25 19:40 Martin Wilck
2001-06-26 2:56 ` Guest section DW
2001-06-26 14:07 ` Martin Wilck
2001-06-26 15:49 ` Guest section DW [this message]
2001-06-26 16:55 ` Martin Wilck
2001-06-26 17:16 ` Guest section DW
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010626174942.A24389@win.tue.nl \
--to=dwguest@win.tue.nl \
--cc=Martin.Wilck@fujitsu-siemens.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®