From: David Mosberger <davidm@napali.hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] more prefetch/vga issues
Date: Mon, 13 May 2002 19:03:46 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590701905577@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590701905576@msgid-missing>
>>>>> On Mon, 13 May 2002 09:12:03 -0600, Alex Williamson <alex_williamson@hp.com> said:
Alex> Thanks to Asit's patch a while back, we've seen a lot less
Alex> MCA's from accesses to the VGA range. There still seems to be
Alex> one lurking though. I've traced it down to the prefetching in
Alex> free_one_pgd(). This function prefetches farther than it
Alex> needs to, and can easily try to prefetch from the VGA MMIO
Alex> region at 0xa0000. On an HP zx1 system, this causes an MCA if
Alex> the VGA card doesn't respond.
Again, prefetching arbitrary addresses is always valid. So, by
definition, it's not the lfetch that's broken (though it may be a bad
idea to do it anyhow, for performance reasons, but that's a different
issue).
Alex> There seem to be (at least) two solutions to this. One is
Alex> to modify mm/memory.c such that it only prefetches to the
Alex> extent that it uses. This might have some performance
Alex> implications, but they're likely minimal.
We would have to show that. At the moment, we use an "asm" to do the
lfetch, so it can't be predicated (we need to look into using
__builtin_prefetch() instead; hopefully that one can be predicated).
And on other archiectures, the performance effect of adding the check
may be more noticable.
On the other hand, the major reason for doing the prefetch is to get
good execve() performance on SMP, and for SMP, extraneous prefetching
can be quite hurtful. So you might have a pretty good argument for
not prefetching past the end of the page on all architectures. But I
we'd still have to back it up with numbers.
Alex> The other
Alex> alternative, is that efi_memmap_walk() could detect this
Alex> situation, and ignore a page of memory. This can be a generic
Alex> test, just checking for usable memory directly adjacent to
Alex> MMIO.
Yes, I think we need to put in such a test. However, it should check
for any overlap of a UC/WC-only area with a "granule" that contains WB
areas, where a "granule" is a 16 or 64MB page. Actually, if we put in
this test, there should be less need for the 16MB granule size
anymore. Of course, we may end up throwing a lot of memory that way.
We should print a warning at least, so that users can see how much
memory is being ignored (and why).
I think this is a reasonable workaround until we get around to fixing
the <64MB memory attribute aliasing issues in a better way.
--david
prev parent reply other threads:[~2002-05-13 19:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-13 15:12 [Linux-ia64] more prefetch/vga issues Alex Williamson
2002-05-13 19:03 ` David Mosberger [this message]
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=marc-linux-ia64-105590701905577@msgid-missing \
--to=davidm@napali.hpl.hp.com \
--cc=linux-ia64@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