public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: mpatocka@redhat.com, jens.axboe@oracle.com,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	davem@davemloft.net, linux-parisc@vger.kernel.org
Subject: Re: [PATCH] block: fix q->max_segment_size checking in blk_recalc_rq_segments about VMERGE
Date: Thu, 17 Jul 2008 16:27:19 +0300	[thread overview]
Message-ID: <487F48B7.3010807@panasas.com> (raw)
In-Reply-To: <20080717221908D.fujita.tomonori@lab.ntt.co.jp>

FUJITA Tomonori wrote:
> On Thu, 17 Jul 2008 07:50:24 -0400 (EDT)
> Mikulas Patocka <mpatocka@redhat.com> wrote:
> 
>>>>> Please give me an example how the boundary restriction of a device can
>>>>> break the VMERGE accounting and an IOMMU if you aren't still sure.
>>>> You have dma_get_seg_boundary and dma_get_max_seg_size. On sparc64, adding 
>>>> one of these broken VMERGE accounting (the VMERGE didn't happen past 64-kb 
>>>> boundary and bio layer thought that VMERGE would be possible).
>>> If the device has 64KB boundary restriction, the device also has
>>> max_seg_size restriction of 64KB or under. So the vmerge acounting
>>> works (though we need to fix it to handle max_seg_size, as discussed).
>>>
>>>> And if you fix this case, someone will break it again, sooner or later, by 
>>>> adding new restriction.
>>> All restrictions that IOMMUs need to know are dma_get_seg_boundary and
>>> dma_get_max_seg_size.
>>>
>>> What is your new restriction?
>> We don't know what happens in the future.
> 
> It's very unlikely to add new restrictions.
> 
> 
>> And that is the problem that we 
>> don't know --- but we have two pieces of code (blk-merge and iommu) that 
>> try to calculate the same number (number of hw segments) and if they get 
>> different result, it will crash. If the calculations were done at one 
>> place, there would be no problem with that.
> 
> I don't think that your argument, 'the problem that we don't know', is
> true.
> 
> With the vmerge accounting, we calculate at two places. So if we add
> a new restriction, we need to handle it at two places. It's a logical
> result.
> 
> Of course, it's easier to calculate at one place rather than two
> places. But 'we don't know what restriction we will need' isn't a
> problem.
> 
> 
> BTW, as I've already said, I'm not against removing the vmerge
> accounting from the block layer.

I have a question. Does the block layer know of the IOMMU in use
for the device? can it call into the IOMMU to calculate the
restriction?

Thanks Boaz


  reply	other threads:[~2008-07-17 13:28 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 [this message]
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
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=487F48B7.3010807@panasas.com \
    --to=bharrosh@panasas.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 \
    --cc=mpatocka@redhat.com \
    /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