On Thu, Dec 17, 2009 at 09:42:15AM -0800, Linus Torvalds wrote: > > Which is exactly what the XFS code does. Pages are allocated manually > > and we store pointers to the page struct that later get added to the > > bio. > > Hmm. The BIO interface that the patch-series changes (bio_map_kern) > doesn't work that way. It takes a "buf, len" kind of thing. That's what > I'm complaining about. Indeed, the "block: permit I/O to vmalloc/vmap kernel pages" does what you complain about. But the series doesn't actually add a user for that. What it does in XFS is quite a bit of black magic, too - but only with the new cache coherence calls that are noops on architectures with physically indexed caches. > Well, they clearly are _after_ this series, since that's what all those > changes to __bio_map_kernel() and bio_map_kern_endio() are all about. > > So I believe you when you say that XFS perhaps does everything right - I > just think that the patch series in question actually makes things worse, > exactly because it is starting to use virtual addresses. I'm not entirely sure why James added those, but XFS doesn't actually use bio_map_kern. > And I really think that would be all much more properly done at the > _caller_ level, not by the BIO layer. > > You must have some locking and allocation etc logic at the caller anyway, > why doesn't _that_ level just do the flushing or invalidation? http://git.kernel.org/?p=linux/kernel/git/kyle/parisc-2.6.git;a=commitdiff;h=56c8214b842324e94aa88012010b0f1f9847daec does it in the caller level. Not exactly in a beautiful way, but who am I complain as I'm already lost in our mess of cache coherency APIs. > IOW, I'm perfectly happy with the patch to fs/xfs/linux-2.6/xfs_buf.c. > That one still seems to use 'bio_add_page()' with a regular 'struct page'. > > But the fs/bio.c patch looks like just total and utter crap to me, and is > the reason I refuse to pull this series. Kyle/James, can you regenerate the tree without that patch included? -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html