From: David Ahern <david.ahern@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: torvalds@linux-foundation.org, sparclinux@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
bpicco@meloft.net
Subject: Re: 4.0.0-rc4: panic in free_block
Date: Mon, 23 Mar 2015 17:34:34 +0000 [thread overview]
Message-ID: <55104EAA.4060607@oracle.com> (raw)
In-Reply-To: <20150323.122530.812870422534676208.davem@davemloft.net>
On 3/23/15 10:25 AM, David Miller wrote:
> [PATCH] sparc64: Fix several bugs in memmove().
>
> Firstly, handle zero length calls properly. Believe it or not there
> are a few of these happening during early boot.
>
> Next, we can't just drop to a memcpy() call in the forward copy case
> where dst <= src. The reason is that the cache initializing stores
> used in the Niagara memcpy() implementations can end up clearing out
> cache lines before we've sourced their original contents completely.
>
> For example, considering NG4memcpy, the main unrolled loop begins like
> this:
>
> load src + 0x00
> load src + 0x08
> load src + 0x10
> load src + 0x18
> load src + 0x20
> store dst + 0x00
>
> Assume dst is 64 byte aligned and let's say that dst is src - 8 for
> this memcpy() call. That store at the end there is the one to the
> first line in the cache line, thus clearing the whole line, which thus
> clobbers "src + 0x28" before it even gets loaded.
>
> To avoid this, just fall through to a simple copy only mildly
> optimized for the case where src and dst are 8 byte aligned and the
> length is a multiple of 8 as well. We could get fancy and call
> GENmemcpy() but this is good enough for how this thing is actually
> used.
>
> Reported-by: David Ahern <david.ahern@oracle.com>
> Reported-by: Bob Picco <bpicco@meloft.net>
> Signed-off-by: David S. Miller <davem@davemloft.net>
seems like a formality at this point, but this resolves the panic on the
M7-based ldom and baremetal. The T5-8 failed to boot, but it could be a
different problem.
Thanks for the fast turnaround,
David
WARNING: multiple messages have this Message-ID (diff)
From: David Ahern <david.ahern@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: torvalds@linux-foundation.org, sparclinux@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
bpicco@meloft.net
Subject: Re: 4.0.0-rc4: panic in free_block
Date: Mon, 23 Mar 2015 11:34:34 -0600 [thread overview]
Message-ID: <55104EAA.4060607@oracle.com> (raw)
In-Reply-To: <20150323.122530.812870422534676208.davem@davemloft.net>
On 3/23/15 10:25 AM, David Miller wrote:
> [PATCH] sparc64: Fix several bugs in memmove().
>
> Firstly, handle zero length calls properly. Believe it or not there
> are a few of these happening during early boot.
>
> Next, we can't just drop to a memcpy() call in the forward copy case
> where dst <= src. The reason is that the cache initializing stores
> used in the Niagara memcpy() implementations can end up clearing out
> cache lines before we've sourced their original contents completely.
>
> For example, considering NG4memcpy, the main unrolled loop begins like
> this:
>
> load src + 0x00
> load src + 0x08
> load src + 0x10
> load src + 0x18
> load src + 0x20
> store dst + 0x00
>
> Assume dst is 64 byte aligned and let's say that dst is src - 8 for
> this memcpy() call. That store at the end there is the one to the
> first line in the cache line, thus clearing the whole line, which thus
> clobbers "src + 0x28" before it even gets loaded.
>
> To avoid this, just fall through to a simple copy only mildly
> optimized for the case where src and dst are 8 byte aligned and the
> length is a multiple of 8 as well. We could get fancy and call
> GENmemcpy() but this is good enough for how this thing is actually
> used.
>
> Reported-by: David Ahern <david.ahern@oracle.com>
> Reported-by: Bob Picco <bpicco@meloft.net>
> Signed-off-by: David S. Miller <davem@davemloft.net>
seems like a formality at this point, but this resolves the panic on the
M7-based ldom and baremetal. The T5-8 failed to boot, but it could be a
different problem.
Thanks for the fast turnaround,
David
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: David Ahern <david.ahern@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: torvalds@linux-foundation.org, sparclinux@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
bpicco@meloft.net
Subject: Re: 4.0.0-rc4: panic in free_block
Date: Mon, 23 Mar 2015 11:34:34 -0600 [thread overview]
Message-ID: <55104EAA.4060607@oracle.com> (raw)
In-Reply-To: <20150323.122530.812870422534676208.davem@davemloft.net>
On 3/23/15 10:25 AM, David Miller wrote:
> [PATCH] sparc64: Fix several bugs in memmove().
>
> Firstly, handle zero length calls properly. Believe it or not there
> are a few of these happening during early boot.
>
> Next, we can't just drop to a memcpy() call in the forward copy case
> where dst <= src. The reason is that the cache initializing stores
> used in the Niagara memcpy() implementations can end up clearing out
> cache lines before we've sourced their original contents completely.
>
> For example, considering NG4memcpy, the main unrolled loop begins like
> this:
>
> load src + 0x00
> load src + 0x08
> load src + 0x10
> load src + 0x18
> load src + 0x20
> store dst + 0x00
>
> Assume dst is 64 byte aligned and let's say that dst is src - 8 for
> this memcpy() call. That store at the end there is the one to the
> first line in the cache line, thus clearing the whole line, which thus
> clobbers "src + 0x28" before it even gets loaded.
>
> To avoid this, just fall through to a simple copy only mildly
> optimized for the case where src and dst are 8 byte aligned and the
> length is a multiple of 8 as well. We could get fancy and call
> GENmemcpy() but this is good enough for how this thing is actually
> used.
>
> Reported-by: David Ahern <david.ahern@oracle.com>
> Reported-by: Bob Picco <bpicco@meloft.net>
> Signed-off-by: David S. Miller <davem@davemloft.net>
seems like a formality at this point, but this resolves the panic on the
M7-based ldom and baremetal. The T5-8 failed to boot, but it could be a
different problem.
Thanks for the fast turnaround,
David
next prev parent reply other threads:[~2015-03-23 17:34 UTC|newest]
Thread overview: 130+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 15:07 4.0.0-rc4: panic in free_block David Ahern
2015-03-20 15:07 ` David Ahern
2015-03-20 16:48 ` Linus Torvalds
2015-03-20 16:48 ` Linus Torvalds
2015-03-20 16:48 ` Linus Torvalds
2015-03-20 16:53 ` David Ahern
2015-03-20 16:53 ` David Ahern
2015-03-20 16:53 ` David Ahern
2015-03-20 16:58 ` Linus Torvalds
2015-03-20 16:58 ` Linus Torvalds
2015-03-20 16:58 ` Linus Torvalds
2015-03-20 18:05 ` David Ahern
2015-03-20 18:05 ` David Ahern
2015-03-20 18:05 ` David Ahern
2015-03-20 18:53 ` Linus Torvalds
2015-03-20 18:53 ` Linus Torvalds
2015-03-20 18:53 ` Linus Torvalds
2015-03-20 19:04 ` David Ahern
2015-03-20 19:04 ` David Ahern
2015-03-20 19:04 ` David Ahern
2015-03-20 19:47 ` David Miller
2015-03-20 19:47 ` David Miller
2015-03-20 19:47 ` David Miller
2015-03-20 19:54 ` David Ahern
2015-03-20 19:54 ` David Ahern
2015-03-20 19:54 ` David Ahern
2015-03-20 20:19 ` David Miller
2015-03-20 20:19 ` David Miller
2015-03-20 20:19 ` David Miller
2015-03-20 19:42 ` David Miller
2015-03-20 19:42 ` David Miller
2015-03-20 19:42 ` David Miller
2015-03-20 20:01 ` Dave Hansen
2015-03-20 20:01 ` Dave Hansen
2015-03-20 20:01 ` Dave Hansen
2015-03-20 21:17 ` Linus Torvalds
2015-03-20 21:17 ` Linus Torvalds
2015-03-20 22:49 ` David Ahern
2015-03-20 22:49 ` David Ahern
2015-03-21 0:18 ` David Ahern
2015-03-21 0:18 ` David Ahern
2015-03-21 0:34 ` David Rientjes
2015-03-21 0:34 ` David Rientjes
2015-03-21 0:39 ` David Ahern
2015-03-21 0:39 ` David Ahern
2015-03-21 0:47 ` Linus Torvalds
2015-03-21 0:47 ` Linus Torvalds
2015-03-21 17:45 ` David Ahern
2015-03-21 17:45 ` David Ahern
2015-03-21 18:49 ` Linus Torvalds
2015-03-21 18:49 ` Linus Torvalds
2015-03-21 18:49 ` Linus Torvalds
2015-03-22 17:36 ` David Miller
2015-03-22 17:36 ` David Miller
2015-03-22 17:36 ` David Miller
2015-03-22 19:25 ` Bob Picco
2015-03-22 19:25 ` Bob Picco
2015-03-22 19:25 ` Bob Picco
2015-03-22 19:47 ` Linus Torvalds
2015-03-22 19:47 ` Linus Torvalds
2015-03-22 19:47 ` Linus Torvalds
2015-03-22 22:23 ` David Miller
2015-03-22 22:23 ` David Miller
2015-03-22 22:23 ` David Miller
2015-03-22 23:35 ` David Ahern
2015-03-22 23:35 ` David Ahern
2015-03-22 23:35 ` David Ahern
2015-03-22 23:54 ` David Miller
2015-03-22 23:54 ` David Miller
2015-03-22 23:54 ` David Miller
2015-03-23 0:03 ` David Ahern
2015-03-23 0:03 ` David Ahern
2015-03-23 0:03 ` David Ahern
2015-03-23 2:00 ` David Miller
2015-03-23 2:00 ` David Miller
2015-03-23 2:00 ` David Miller
2015-03-23 2:19 ` David Miller
2015-03-23 2:19 ` David Miller
2015-03-23 2:19 ` David Miller
2015-03-23 16:25 ` David Miller
2015-03-23 16:25 ` David Miller
2015-03-23 16:25 ` David Miller
2015-03-23 16:51 ` John Stoffel
2015-03-23 16:51 ` John Stoffel
2015-03-23 16:51 ` John Stoffel
2015-03-23 19:16 ` David Miller
2015-03-23 19:16 ` David Miller
2015-03-23 19:16 ` David Miller
2015-03-23 19:56 ` John Stoffel
2015-03-23 19:56 ` John Stoffel
2015-03-23 19:56 ` John Stoffel
2015-03-23 20:08 ` David Miller
2015-03-23 20:08 ` David Miller
2015-03-23 20:08 ` David Miller
2015-03-23 17:00 ` Linus Torvalds
2015-03-23 17:00 ` Linus Torvalds
2015-03-23 17:00 ` Linus Torvalds
2015-03-23 19:08 ` David Miller
2015-03-23 19:08 ` David Miller
2015-03-23 19:08 ` David Miller
2015-03-23 19:47 ` Linus Torvalds
2015-03-23 19:47 ` Linus Torvalds
2015-03-23 19:47 ` Linus Torvalds
2015-03-23 19:52 ` David Miller
2015-03-23 19:52 ` David Miller
2015-03-23 19:52 ` David Miller
2015-03-23 17:34 ` David Ahern [this message]
2015-03-23 17:34 ` David Ahern
2015-03-23 17:34 ` David Ahern
2015-03-23 19:35 ` David Miller
2015-03-23 19:35 ` David Miller
2015-03-23 19:35 ` David Miller
2015-03-23 19:58 ` David Ahern
2015-03-23 19:58 ` David Ahern
2015-03-23 19:58 ` David Ahern
2015-03-24 1:01 ` David Ahern
2015-03-24 1:01 ` David Ahern
2015-03-24 1:01 ` David Ahern
2015-03-24 14:57 ` Bob Picco
2015-03-24 14:57 ` Bob Picco
2015-03-24 14:57 ` Bob Picco
2015-03-24 16:05 ` David Miller
2015-03-24 16:05 ` David Miller
2015-03-24 16:05 ` David Miller
2015-03-22 23:49 ` Linus Torvalds
2015-03-22 23:49 ` Linus Torvalds
2015-03-22 23:49 ` Linus Torvalds
2015-03-22 23:57 ` David Miller
2015-03-22 23:57 ` David Miller
2015-03-22 23:57 ` David Miller
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=55104EAA.4060607@oracle.com \
--to=david.ahern@oracle.com \
--cc=bpicco@meloft.net \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sparclinux@vger.kernel.org \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.