From: Uladzislau Rezki <urezki@gmail.com>
To: Dave Hansen <dave.hansen@intel.com>, Liu Song <fishland@aliyun.com>
Cc: Liu Song <fishland@aliyun.com>,
gregkh@linuxfoundation.org, jroedel@suse.de,
dave.hansen@linux.intel.com, tglx@linutronix.de,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"liu.song11@zte.com.cnhange-folder>?"
<toggle-mailboxes@pc636.kvack.org>
Subject: Re: [RFC PATCH] mm/vmalloc: make sure to traverse from the beginning when overflow occur
Date: Tue, 14 Apr 2020 21:02:15 +0200 [thread overview]
Message-ID: <20200414190215.GA1531@pc636> (raw)
In-Reply-To: <b295ec51-56fd-a377-95c9-a88cf5b151bc@intel.com>
On Mon, Apr 13, 2020 at 08:02:49AM -0700, Dave Hansen wrote:
> On 4/12/20 7:38 AM, Liu Song wrote:
> > If overflow, should ensure that "free_vmap_cache" is set to NULL,
> > so as to ensure that it can be traversed from the beginning.
>
> This changelog is a bit sparse.
>
> Does this fix a demonstrated problem? Or was it just discovered via
> code review and assumed to help a theoretical problem?
>
> Which tree is it against? 'free_vmap_cache' doesn't show up in Linus's
> tree.
> > diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> > index d8e877365f9f..2638a20d36ce 100644
> > --- a/mm/vmalloc.c
> > +++ b/mm/vmalloc.c
> > @@ -441,7 +441,7 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
> > if (!free_vmap_cache ||
> > size < cached_hole_size ||
> > vstart < cached_vstart ||
> > - align < cached_align) {
> > + align < cached_align || purged) {
> > nocache:
> > cached_hole_size = 0;
> > free_vmap_cache = NULL;
> >
We do not have such code since 5.2 kernel or so, nor things like
cached_hole_size, free_vmap_cache and so on. It was totally reworked.
--
Vlad Rezki
prev parent reply other threads:[~2020-04-14 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-12 14:38 [RFC PATCH] mm/vmalloc: make sure to traverse from the beginning when overflow occur Liu Song
2020-04-13 15:02 ` Dave Hansen
2020-04-14 14:54 ` fishland
2020-04-14 19:02 ` Uladzislau Rezki [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=20200414190215.GA1531@pc636 \
--to=urezki@gmail.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=fishland@aliyun.com \
--cc=gregkh@linuxfoundation.org \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tglx@linutronix.de \
--cc=toggle-mailboxes@pc636.kvack.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).