From: Matthew Wilcox <willy@linux.intel.com>
To: John David Anglin <dave.anglin@bell.net>
Cc: linux-mm@kvack.org, "David S. Miller" <davem@davemloft.net>,
sparclinux@vger.kernel.org, linux-parisc@vger.kernel.org,
linux-mips@linux-mips.org
Subject: Re: [PATCH] remap_file_pages needs to check for cache coherency
Date: Fri, 27 Dec 2013 14:33:30 -0500 [thread overview]
Message-ID: <20131227193330.GE4945@linux.intel.com> (raw)
In-Reply-To: <BLU0-SMTP17D26551261DF285A7E6F497CD0@phx.gbl>
On Fri, Dec 27, 2013 at 02:13:16PM -0500, John David Anglin wrote:
> On 27-Dec-13, at 1:00 PM, Matthew Wilcox wrote:
>
> >+#ifdef __ARCH_FORCE_SHMLBA
> >+ /* Is the mapping cache-coherent? */
> >+ if ((pgoff ^ linear_page_index(vma, start)) &
> >+ ((SHMLBA-1) >> PAGE_SHIFT))
> >+ goto out;
> >+#endif
>
>
> I think this will cause problems on PA-RISC. The reason is we have
> an additional offset
> for mappings. See get_offset() in sys_parisc.c.
I don't think it will cause any additional problems. The test merely
asks "Is the offset to put at this address cache-coherent with the offset
that was at this address when the mmap was established?"
> SHMLBA is 4 MB on PA-RISC. If we limit ourselves to aligned
> mappings, we run out of
> memory very quickly. Even with our current implementation, we fail
> the perl locales test
> with locales-all installed.
I know the large SHMLBA is problematic for PA-RISC, but I don't think
there's a lot of code out there using remap_file_pages(). code.google.com
found almost nothing, and a regular google search found only a couple
of little toys.
Have you considered measuring SHMLBA on different CPU models and
reducing it at boot time? I know that 4MB is the architectural guarantee
(actually, I seem to remember that 16MB was the architectural guarantee,
but jsm found some CPU architects who said it would enver exceed 4MB).
I bet some CPUs have considerably lower cache coherency limits.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-12-27 19:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 18:00 Matthew Wilcox
2013-12-27 18:48 ` David Miller
2013-12-27 19:20 ` Matthew Wilcox
2013-12-27 19:13 ` John David Anglin
2013-12-27 19:33 ` Matthew Wilcox [this message]
2013-12-27 19:47 ` John David Anglin
2013-12-27 20:14 ` John David Anglin
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=20131227193330.GE4945@linux.intel.com \
--to=willy@linux.intel.com \
--cc=dave.anglin@bell.net \
--cc=davem@davemloft.net \
--cc=linux-mips@linux-mips.org \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=sparclinux@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