lkml.org 
[lkml]   [2008]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] block: fix q->max_segment_size checking in blk_recalc_rq_segments about VMERGE
> > > 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. 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.

Mikulas


\
 
 \ /
  Last update: 2008-07-17 13:53    [W:0.092 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site