From: Bob Picco <bpicco@meloft.net>
To: David Miller <davem@davemloft.net>
Cc: torvalds@linux-foundation.org, david.ahern@oracle.com,
sparclinux@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: 4.0.0-rc4: panic in free_block
Date: Sun, 22 Mar 2015 15:25:57 -0400 [thread overview]
Message-ID: <20150322192557.GA2929@zareason> (raw)
In-Reply-To: <20150322.133603.471287558426791155.davem@davemloft.net>
David Miller wrote: [Sun Mar 22 2015, 01:36:03PM EDT]
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Sat, 21 Mar 2015 11:49:12 -0700
>
> > Davem? I don't read sparc assembly, so I'm *really* not going to try
> > to verify that (a) all the memcpy implementations always copy
> > low-to-high and (b) that I even read the address comparisons in
> > memmove.S right.
>
> All of the sparc memcpy implementations copy from low to high.
> I'll eat my hat if they don't. :-)
>
> The guard tests at the beginning of memmove() are saying:
>
> if (dst <= src)
> memcpy(...);
> if (src + len <= dst)
> memcpy(...);
>
> And then the reverse copy loop (and we do have to copy in reverse for
> correctness) is basically:
>
> src = (src + len - 1);
> dst = (dst + len - 1);
>
> 1: tmp = *(u8 *)src;
> len -= 1;
> src -= 1;
> *(u8 *)dst = tmp;
> dst -= 1;
> if (len != 0)
> goto 1b;
>
> And then we return the original 'dst' pointer.
>
> So at first glance it looks at least correct.
>
> memmove() is a good idea to look into though, as SLAB and SLUB are the
> only really heavy users of it, and they do so with overlapping
> contents.
>
> And they end up using that byte-at-a-time code, since SLAB and SLUB
> do mmemove() calls of the form:
>
> memmove(X + N, X, LEN);
>
> In which case neither of the memcpy() guard tests will pass.
>
> Maybe there is some subtle bug in there I just don't see right now.
My original pursuit of this issue focused on transfers to and from the shared
array. Basically substituting memcpy-s with a primitive unsigned long memory
mover. This might have been incorrect.
There were substantial doubts because of large modifications to 2.6.39 too.
Unstabile hardware cause(d|s) issue too.
Eliminating the shared array functions correctly. Though this removal changes
performance and timing dramatically.
This afternoon I included modification of two memmove-s and no issue thus far.
The issue APPEARS to come from memmove-s within cache_flusharray() and/or
drain_array(). Now we are covering moves within an array_cache.
The above was done on 2.6.39.
--
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:[~2015-03-22 19:28 UTC|newest]
Thread overview: 46+ 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 16:48 ` Linus Torvalds
2015-03-20 16:53 ` David Ahern
2015-03-20 16:58 ` Linus Torvalds
2015-03-20 18:05 ` David Ahern
2015-03-20 18:53 ` Linus Torvalds
2015-03-20 19:04 ` David Ahern
2015-03-20 19:47 ` David Miller
2015-03-20 19:54 ` David Ahern
2015-03-20 20:19 ` David Miller
2015-03-20 19:42 ` David Miller
2015-03-20 20:01 ` Dave Hansen
2015-03-20 21:17 ` Linus Torvalds
2015-03-20 22:49 ` David Ahern
2015-03-21 0:18 ` David Ahern
2015-03-21 0:34 ` David Rientjes
2015-03-21 0:39 ` David Ahern
2015-03-21 0:47 ` Linus Torvalds
2015-03-21 17:45 ` David Ahern
2015-03-21 18:49 ` Linus Torvalds
2015-03-22 17:36 ` David Miller
2015-03-22 19:25 ` Bob Picco [this message]
2015-03-22 19:47 ` Linus Torvalds
2015-03-22 22:23 ` David Miller
2015-03-22 23:35 ` David Ahern
2015-03-22 23:54 ` David Miller
2015-03-23 0:03 ` David Ahern
2015-03-23 2:00 ` David Miller
2015-03-23 2:19 ` David Miller
2015-03-23 16:25 ` David Miller
2015-03-23 16:51 ` John Stoffel
2015-03-23 19:16 ` David Miller
2015-03-23 19:56 ` John Stoffel
2015-03-23 20:08 ` David Miller
2015-03-23 17:00 ` Linus Torvalds
2015-03-23 19:08 ` David Miller
2015-03-23 19:47 ` Linus Torvalds
2015-03-23 19:52 ` David Miller
2015-03-23 17:34 ` David Ahern
2015-03-23 19:35 ` David Miller
2015-03-23 19:58 ` David Ahern
2015-03-24 1:01 ` David Ahern
2015-03-24 14:57 ` Bob Picco
2015-03-24 16:05 ` David Miller
2015-03-22 23:49 ` Linus Torvalds
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=20150322192557.GA2929@zareason \
--to=bpicco@meloft.net \
--cc=davem@davemloft.net \
--cc=david.ahern@oracle.com \
--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 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).