linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Uladzislau Rezki <urezki@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	"Tobin C. Harding" <tobin@kernel.org>
Cc: Roman Gushchin <guro@fb.com>, Michal Hocko <mhocko@suse.com>,
	Matthew Wilcox <willy@infradead.org>,
	 Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 Thomas Garnier <thgarnie@google.com>,
	 Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	 Joel Fernandes <joelaf@google.com>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	 Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH v4 1/3] mm/vmap: keep track of free blocks for vmap allocation
Date: Thu, 16 May 2019 09:30:49 +0200	[thread overview]
Message-ID: <CA+KHdyURm1xb1u4=aV97KQYFi0R_3=SJPBCezWqEB8hT=J8pCw@mail.gmail.com> (raw)
In-Reply-To: <20190515152415.lcbnqvcjppype7i5@pc636>

+Tobin C. Harding <tobin@kernel.org>

On Wed, May 15, 2019 at 5:24 PM Uladzislau Rezki <urezki@gmail.com> wrote:
>
> Hello, Andrew.
>
> > An earlier version of this patch was accused of crashing the kernel:
> >
> > https://lists.01.org/pipermail/lkp/2019-April/010004.html
> >
> > does the v4 series address this?
> I tried before to narrow down that crash but i did not succeed, so
> i have never seen that before on my test environment as well as
> during running lkp-tests including trinity test case:
>
> test-url: http://codemonkey.org.uk/projects/trinity/
>
> But after analysis of the Call-trace and slob_alloc():
>
> <snip>
> [    0.395722] Call Trace:
> [    0.395722]  slob_alloc+0x1c9/0x240
> [    0.395722]  kmem_cache_alloc+0x70/0x80
> [    0.395722]  acpi_ps_alloc_op+0xc0/0xca
> [    0.395722]  acpi_ps_get_next_arg+0x3fa/0x6ed
> <snip>
>
> <snip>
>     /* Attempt to alloc */
>     prev = sp->lru.prev;
>     b = slob_page_alloc(sp, size, align);
>     if (!b)
>         continue;
>
>     /* Improve fragment distribution and reduce our average
>      * search time by starting our next search here. (see
>      * Knuth vol 1, sec 2.5, pg 449) */
>     if (prev != slob_list->prev &&
>             slob_list->next != prev->next)
>         list_move_tail(slob_list, prev->next); <- Crash is here in __list_add_valid()
>     break;
> }
> <snip>
>
> i see that it tries to manipulate with "prev" node that may be removed
> from the list by slob_page_alloc() earlier if whole page is used. I think
> that crash has to be fixed by the below commit:
>
> https://www.spinics.net/lists/mm-commits/msg137923.html
>
> it was introduced into 5.1-rc3 kernel.
>
> Why ("mm/vmalloc.c: keep track of free blocks for vmap allocation")
> was accused is probably because it uses "kmem cache allocations with struct alignment"
> instead of kmalloc()/kzalloc(). Maybe because of bigger size requests
> it became easier to trigger the BUG. But that is theory.
>
> --
> Vlad Rezki



-- 
Uladzislau Rezki


  reply	other threads:[~2019-05-16  7:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-06 18:35 [PATCH v4 0/3] improve " Uladzislau Rezki (Sony)
2019-04-06 18:35 ` [PATCH v4 1/3] mm/vmap: keep track of free blocks for " Uladzislau Rezki (Sony)
2019-04-08 23:19   ` Roman Gushchin
2019-04-09  9:45     ` Uladzislau Rezki
2019-05-14 21:19   ` Andrew Morton
2019-05-15 15:24     ` Uladzislau Rezki
2019-05-16  7:30       ` Uladzislau Rezki [this message]
2019-04-06 18:35 ` [PATCH v4 2/3] mm/vmap: add DEBUG_AUGMENT_PROPAGATE_CHECK macro Uladzislau Rezki (Sony)

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='CA+KHdyURm1xb1u4=aV97KQYFi0R_3=SJPBCezWqEB8hT=J8pCw@mail.gmail.com' \
    --to=urezki@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=guro@fb.com \
    --cc=joelaf@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mingo@elte.hu \
    --cc=oleksiy.avramchenko@sonymobile.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=thgarnie@google.com \
    --cc=tj@kernel.org \
    --cc=tobin@kernel.org \
    --cc=willy@infradead.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