From: Coly Li <colyli@suse.de>
To: songliubraving@fb.com, linux-raid@vger.kernel.org
Cc: mhocko@suse.com, kent.overstreet@gmail.com,
guoqing.jiang@cloud.ionos.com
Subject: Re: [PATCH v2 4/4] md: remove redundant memalloc scope API usage
Date: Thu, 9 Apr 2020 19:55:31 +0800 [thread overview]
Message-ID: <74a9c926-abe4-ff05-4deb-bce7b42f4861@suse.de> (raw)
In-Reply-To: <20200409115258.19330-5-colyli@suse.de>
On 2020/4/9 7:52 下午, colyli@suse.de wrote:
> From: Coly Li <colyli@suse.de>
>
> In mddev_create_serial_pool(), memalloc scope APIs memalloc_noio_save()
> and memalloc_noio_restore() are used when allocating memory by calling
> mempool_create_kmalloc_pool(). After adding the memalloc scope APIs in
> raid array suspend context, it is unncessary to explicitly call them
> around mempool_create_kmalloc_pool() any longer.
>
> This patch removes the redundant memalloc scope APIs in
> mddev_create_serial_pool().
>
> Signed-off-by: Coly Li <colyli@suse.de>
> Cc: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
> ---
> drivers/md/md.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 1a8e1bb3a7f4..ef29f49a0f51 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -229,11 +229,9 @@ void mddev_create_serial_pool(struct mddev *mddev, struct md_rdev *rdev,
> if (mddev->serial_info_pool == NULL) {
> unsigned int noio_flag;
^^^^^^^^^^^^^^^^^^^^^^^ I will remove this one in v3 series.
Coly Li
>
> - noio_flag = memalloc_noio_save();
> mddev->serial_info_pool =
> mempool_create_kmalloc_pool(NR_SERIAL_INFOS,
> sizeof(struct serial_info));
> - memalloc_noio_restore(noio_flag);
> if (!mddev->serial_info_pool) {
> rdevs_uninit_serial(mddev);
> pr_err("can't alloc memory pool for serialization\n");
>
next prev parent reply other threads:[~2020-04-09 11:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 11:52 [PATCH v2 0/4] improve memalloc scope APIs usage colyli
2020-04-09 11:52 ` [PATCH v2 1/4] md: use memalloc scope APIs in mddev_suspend()/mddev_resume() colyli
2020-04-09 11:52 ` [PATCH v2 2/4] raid5: remove gfp flags from scribble_alloc() colyli
2020-04-09 11:52 ` [PATCH v2 3/4] raid5: update code comment of scribble_alloc() colyli
2020-04-09 11:52 ` [PATCH v2 4/4] md: remove redundant memalloc scope API usage colyli
2020-04-09 11:55 ` Coly Li [this message]
2020-04-30 6:49 ` [PATCH v2 0/4] improve memalloc scope APIs usage Song Liu
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=74a9c926-abe4-ff05-4deb-bce7b42f4861@suse.de \
--to=colyli@suse.de \
--cc=guoqing.jiang@cloud.ionos.com \
--cc=kent.overstreet@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=songliubraving@fb.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;
as well as URLs for NNTP newsgroup(s).