From: Mikulas Patocka <mpatocka@redhat.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: David Miller <davem@davemloft.net>,
fujita.tomonori@lab.ntt.co.jp, jens.axboe@oracle.com,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-parisc@vger.kernel.org
Subject: Re: [PATCH] block: fix q->max_segment_size checking in blk_recalc_rq_segments about VMERGE
Date: Thu, 24 Jul 2008 17:49:14 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0807241727320.12036@devserv.devel.redhat.com> (raw)
In-Reply-To: <1216918371.4524.38.camel@localhost.localdomain>
On Thu, 24 Jul 2008, James Bottomley wrote:
> On Thu, 2008-07-24 at 12:34 -0400, Mikulas Patocka wrote:
> > On Thu, 24 Jul 2008, James Bottomley wrote:
> >
> > > On Thu, 2008-07-24 at 11:07 -0400, Mikulas Patocka wrote:
> > > > So try to #define BIO_VMERGE_BOUNDARY 0 for Pa-Risc and tell us what
> > > > performance degradation do you see (and what driver do you use and what is
> > > > the I/O pattern).
> > > >
> > > > If you show something specific, we can consider that --- but you haven't
> > > > yet told us anything, except generic talk.
> > >
> > > You keep ignoring inconvenient facts. For about the third time:
> > >
> > > I run a test bed for sg_tables (large chaining of requests). This runs
> > > on parisc using virtual merging (has to because the final physical table
> > > size can't go over the sg list of the SCSI card). If I turn off virtual
> > > merging I can no longer test sg_tables in vanilla kernels.
> > >
> > > James
> >
> > What sg_tables test do you mean? What does the test do? Why couldn't you
> > run the test if BIO_VMERGE_BOUNDARY is 0? Normal I/O obviously can work
> > with BIO_VMERGE_BOUNDARY 0, the kernel will just send more smaller
>
> Look, if you don't really understand what I'm doing, it's not really my
> job to educate you. The sg_table discussions are on marc.info, mainly
> on the SCSI lists; just look for 'sg chaining' in the header (need to
> use google site ... marc's search is bad).
>
> You can complain if the code is impacting you ... but I believe I've
> optimised it so it isn't. Your basic problem amounts to you not liking
> me doing something that has no impact on you ... I'm afraid that's what
> freedom leads to (shocking, I know).
>
> James
Chaining of sg_tables is used for drivers with big sg tables --- and
vmerge counting is used for drivers with small sg tables. So what do they
have in common?
Summary, what I mean:
* in blk-merge.c, you have 85 lines, that is 16% of the size of the file,
devoted to counting of hw_segments
* it is only used on two architectures, one already outdated (alpha), the
other being discontinued (pa-risc). On all the other architectures,
hw_segments == phys_segments
* it is prone to bugs and hard to maintain, because the same value must be
calculated in blk-merge.c and in architectural iommu functions --- if the
value differs, you create too long request, corrupt kernel memory and
crash (happened on sparc64). Anyone changing blk-merge in the future will
risk breaking something on the architectures that use BIO_VMERGE_BOUNDARY
--- and because these architectures are so rare, the bug will go unnoticed
for long time --- like in the case of sparc64.
* you are just talking how this code is important for performance without
showing any single proof that it really is (temporarily disable
hw_segments accounting by defining BIO_VMERGE_BOUNDARY 0 and get the
numbers).
Mikulas
next prev parent reply other threads:[~2008-07-24 21:49 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 10:44 [PATCH] block: fix q->max_segment_size checking in blk_recalc_rq_segments about VMERGE FUJITA Tomonori
2008-07-15 13:37 ` Mikulas Patocka
2008-07-15 14:20 ` FUJITA Tomonori
2008-07-15 14:37 ` Mikulas Patocka
2008-07-15 15:30 ` FUJITA Tomonori
2008-07-15 15:46 ` Mikulas Patocka
2008-07-16 0:34 ` FUJITA Tomonori
2008-07-16 18:02 ` Mikulas Patocka
2008-07-17 4:14 ` FUJITA Tomonori
2008-07-17 11:50 ` Mikulas Patocka
2008-07-17 13:18 ` FUJITA Tomonori
2008-07-17 13:27 ` Boaz Harrosh
2008-07-17 13:56 ` James Bottomley
2008-07-19 7:28 ` David Miller
2008-07-20 1:45 ` Mikulas Patocka
2008-07-20 2:17 ` James Bottomley
2008-07-20 4:07 ` David Miller
2008-07-20 14:52 ` James Bottomley
2008-07-20 17:23 ` David Miller
2008-07-20 17:33 ` James Bottomley
2008-07-24 15:07 ` Mikulas Patocka
2008-07-24 15:28 ` James Bottomley
2008-07-24 16:34 ` Mikulas Patocka
2008-07-24 16:52 ` James Bottomley
2008-07-24 21:49 ` Mikulas Patocka [this message]
2008-07-24 21:53 ` David Miller
2008-07-25 3:47 ` James Bottomley
2008-07-25 5:21 ` David Miller
2008-07-25 2:26 ` FUJITA Tomonori
2008-07-25 2:40 ` [PATCH] block: fix q->max_segment_size checking in blk_recalc_rq_segments John David Anglin
2008-07-20 5:54 ` [PATCH] block: fix q->max_segment_size checking in blk_recalc_rq_segments about VMERGE David Miller
2008-07-15 14:50 ` James Bottomley
2008-07-15 15:24 ` Mikulas Patocka
2008-07-15 15:41 ` James Bottomley
2008-07-15 15:58 ` Mikulas Patocka
2008-07-15 16:07 ` James Bottomley
2008-07-15 16:20 ` Mikulas Patocka
2008-07-15 16:36 ` James Bottomley
2008-07-15 21:50 ` Mikulas Patocka
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=Pine.LNX.4.64.0807241727320.12036@devserv.devel.redhat.com \
--to=mpatocka@redhat.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=davem@davemloft.net \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-scsi@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