From: 王鹏 <rocking@whu.edu.cn>
To: "andrew morton" <akpm@linux-foundation.org>
Cc: andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk,
ynorov@caviumnetworks.com, arnd@arndb.de, courbet@google.com,
osandov@fb.com, linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH] bitmap: Add bitmap_valloc(), bitmap_vzalloc() and bitmap_vfree()
Date: Sat, 29 Dec 2018 11:11:46 +0800 (GMT+08:00) [thread overview]
Message-ID: <4d8c67f0.108f13.167f7f23a8a.Coremail.rocking@whu.edu.cn> (raw)
In-Reply-To: <20181228154137.c161e699e2293a07458580d3@linux-foundation.org>
On Date: Fri, 28 Dec 2018 15:41:37 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
> From: "Andrew Morton" <akpm@linux-foundation.org>
> Sent Time: 2018-12-29 07:41:37 (Saturday)
> To: "Peng Wang" <rocking@whu.edu.cn>
> Cc: andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk, ynorov@caviumnetworks.com, arnd@arndb.de, courbet@google.com, osandov@fb.com, linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] bitmap: Add bitmap_valloc(), bitmap_vzalloc() and bitmap_vfree()
>
> On Fri, 28 Dec 2018 00:18:29 +0800 Peng Wang <rocking@whu.edu.cn> wrote:
>
> > Introduce bitmap alloc/free helpers when contiguous
> > memory is not necessary.
>
> That's a large bitmap you have there. What code needs this?
Hi Andrew,
Not only for large bitmap. This can also benefit from high memory pressure with no requirement for physical continuousness.
While these two casees are rather rare. And I only find one place in mm/swapfile.c.
3224 /* frontswap enabled? set up bit-per-page map for frontswap */
3225 if (IS_ENABLED(CONFIG_FRONTSWAP))
3226 frontswap_map = kvcalloc(BITS_TO_LONGS(maxpages),
3227 sizeof(long),
3228 GFP_KERNEL);
I am not sure whether these helper functions can gain as much benefits as the efforts to introduce them.
Cheers,
Peng
prev parent reply other threads:[~2018-12-29 4:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-27 16:18 Peng Wang
2018-12-28 23:41 ` Andrew Morton
2018-12-29 3:11 ` 王鹏 [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=4d8c67f0.108f13.167f7f23a8a.Coremail.rocking@whu.edu.cn \
--to=rocking@whu.edu.cn \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=courbet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=osandov@fb.com \
--cc=ynorov@caviumnetworks.com \
/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
all inboxes | Powered by JetHome®