linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Chanho Min <chanho.min@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Cong Wang <amwang@redhat.com>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Mel Gorman <mel@csn.ul.ie>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Chanho Min <chanho0207@gmail.com>
Subject: Re: [PATCH] vmalloc: Remove alloc_map from vmap_block.
Date: Fri, 8 Feb 2013 02:01:14 -0500	[thread overview]
Message-ID: <20130208070114.GB7511@cmpxchg.org> (raw)
In-Reply-To: <CAOAMb1BwVCPMLRMkMZuHhoi-meULJ-jG+O5sU4ppkR_MLDQ5dg@mail.gmail.com>

On Fri, Feb 08, 2013 at 12:37:13PM +0900, Chanho Min wrote:
> >I started looking for workloads to profile but then lost interest.
> >The current code can theoretically end up walking through a lot of
> >partially used blocks if a string of allocations never fit any of
> >them.  The number of these blocks depends on previous allocations that
> >leave them unusable for future allocations and whether any other
> >vmalloc/vmap user recently flushed them all.  So it's painful to think
> >about it and hard to impossible to pin down should this ever actually
> >result in a performance problem.
> 
> vm_map_ram() is allowed to be called by external kernel module.
> I profiled some kernel module as bellow perf log. Its mapping behavior
> was most of the workload. yes, we can improve its inefficient mapping.
> But, This shows the allocation bitmap has the potential to cause significant
> overhead.

No question that you can find a scenario where this bitmap becomes
expensive.  And I don't think we should leave the code as is, because
it really is a waste of time for cpus and readers of the code.

The question is whether we put the bitmap to good use and implement
partial block recycling, or keep with the current allocation model but
make it a little less expensive.

Nobody actually seems interested in implementing partial block
recycling and we do have multiple patches to ditch the bitmap.  I
think we should probably merge the patch that we have and save some
wasted cycles, that doesn't prevent anyone from improving the
algorithm later on.

--
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>

      reply	other threads:[~2013-02-08  7:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07  2:27 Chanho Min
2013-02-07  8:11 ` Johannes Weiner
2013-02-08  3:37 ` Chanho Min
2013-02-08  7:01   ` Johannes Weiner [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=20130208070114.GB7511@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=amwang@redhat.com \
    --cc=chanho.min@lge.com \
    --cc=chanho0207@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=nicolas.pitre@linaro.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