From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-fsdevel@vger.kernel.org,
Octavian Purdila <octavian.purdila@intel.com>,
linux-kernel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [RFC PATCH] xfs: support for non-mmu architectures
Date: Mon, 23 Nov 2015 09:04:00 +1100 [thread overview]
Message-ID: <20151122220400.GC26718@dastard> (raw)
In-Reply-To: <20151120224734.GA28795@bfoster.bfoster>
On Fri, Nov 20, 2015 at 05:47:34PM -0500, Brian Foster wrote:
> On Sat, Nov 21, 2015 at 07:36:02AM +1100, Dave Chinner wrote:
> > On Fri, Nov 20, 2015 at 10:11:19AM -0500, Brian Foster wrote:
> > > On Fri, Nov 20, 2015 at 10:35:47AM +1100, Dave Chinner wrote:
> > > Those latter calls are all from following down through the
> > > map_vm_area()->vmap_page_range() codepath from __vmalloc_area_node(). We
> > > call vm_map_ram() directly from _xfs_buf_map_pages(), which itself calls
> > > down into the same code. Indeed, we already protect ourselves here via
> > > the same memalloc_noio_save() mechanism that kmem_zalloc_large() uses.
> >
> > Yes, we do, but that is separately handled to the allocation of the
> > pages, which we have to do for all types of buffers, mapped or
> > unmapped, because xfs_buf_ioapply_map() requires direct access to
> > the underlying pages to build the bio for IO. If we delegate the
> > allocation of pages to vmalloc, we don't have direct reference to
> > the underlying pages and so we have to do something completely
> > diffferent to build the bios for the buffer....
> >
>
> Octavian points out virt_to_page() in a previous mail. I'm not sure
> that's the right interface solely based on looking at some current
> callers, but there is vmalloc_to_page() so I'd expect we can gain access
> to the pages one way or another.
Sure, but these are not zero cost operations....
> Given that, the buffer allocation code
> would fully populate the xfs_buf as it is today. The buffer I/O
> submission code wouldn't really know the difference and shouldn't have
> to change at all.
The abstraction results in more expensive/complex setup and teardown
of buffers and/or IO submission. i.e. the use of vmalloc() based
abstractions has an additional cost over what we do now.
[...]
> Either way, it would require significantly more investigation/testing to
> enable generic usage. The core point was really just to abstract the
> nommu changes into something that potentially has generic use.
I'm not saying that it is impossible to do this, just trying to work
out if making any changes to support nommu architectures is worth
the potential future trouble making such changes could bring us.
i.e. before working out how to do something, we have to decide
whether it is worth doing in the first place.
Just because you can do something doesn't automatically make it a
good idea....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2015-11-22 22:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 22:46 [RFC PATCH] xfs: support for non-mmu architectures Octavian Purdila
2015-11-19 15:55 ` Brian Foster
2015-11-19 20:54 ` Octavian Purdila
2015-11-20 15:11 ` Brian Foster
2015-11-19 23:35 ` Dave Chinner
2015-11-20 14:09 ` Octavian Purdila
2015-11-20 15:11 ` Brian Foster
2015-11-20 15:35 ` Octavian Purdila
2015-11-20 15:40 ` Brian Foster
2015-11-20 20:36 ` Dave Chinner
2015-11-20 22:47 ` Brian Foster
2015-11-22 22:04 ` Dave Chinner [this message]
2015-11-23 12:50 ` Brian Foster
2015-11-23 21:00 ` Dave Chinner
2015-11-19 23:24 ` Dave Chinner
2015-11-19 23:54 ` Richard Weinberger
2015-11-20 0:58 ` Dave Chinner
2015-11-20 14:26 ` Octavian Purdila
2015-11-20 15:24 ` Brian Foster
2015-11-20 15:31 ` Octavian Purdila
2015-11-20 15:43 ` Brian Foster
2015-11-20 20:07 ` Theodore Ts'o
2015-11-20 13:43 ` Octavian Purdila
2015-11-20 21:08 ` Dave Chinner
2015-11-20 22:26 ` Octavian Purdila
2015-11-22 22:44 ` Dave Chinner
2015-11-23 1:41 ` Octavian Purdila
2015-11-23 21:46 ` Dave Chinner
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=20151122220400.GC26718@dastard \
--to=david@fromorbit.com \
--cc=bfoster@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--cc=xfs@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).