From: Christoph Hellwig <hch@infradead.org>
To: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@infradead.org>,
David Laight <david.laight.linux@gmail.com>,
Li Nan <linan122@huawei.com>, Song Liu <song@kernel.org>,
Xiao Ni <xiao@kernel.org>, Yu Kuai <yukuai@fnnas.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-raid@vger.kernel.org
Subject: Re: [PATCH v3 1/2] xor: use kmalloc() in calibrate_xor_blocks()
Date: Thu, 28 May 2026 01:54:44 -0700 [thread overview]
Message-ID: <ahgC1PDFtFrJrsKC@infradead.org> (raw)
In-Reply-To: <20260528-lib-v3-1-feccddf1cb6d@kernel.org>
On Thu, May 28, 2026 at 10:27:55AM +0300, Mike Rapoport (Microsoft) wrote:
> - b1 = (void *) __get_free_pages(GFP_KERNEL, 2);
> + b1 = kmalloc(PAGE_SIZE * 4, GFP_KERNEL);
> if (!b1) {
> pr_warn("xor: Yikes! No memory available.\n");
> return -ENOMEM;
> @@ -132,7 +133,7 @@ static int __init calibrate_xor_blocks(void)
> pr_info("xor: using function: %s (%d MB/sec)\n",
> fastest->name, fastest->speed);
>
> - free_pages((unsigned long)b1, 2);
> + kvfree(b1);
This should be kfree now.
next prev parent reply other threads:[~2026-05-28 8:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 7:27 [PATCH v3 0/2] lib/raid: replace __get_free_pages() call with kvmalloc() Mike Rapoport (Microsoft)
2026-05-28 7:27 ` [PATCH v3 1/2] xor: use kmalloc() in calibrate_xor_blocks() Mike Rapoport (Microsoft)
2026-05-28 8:54 ` Christoph Hellwig [this message]
2026-05-28 9:49 ` Mike Rapoport
2026-05-28 7:27 ` [PATCH v3 2/2] raid6: use kmalloc() in raid6_select_algo() Mike Rapoport (Microsoft)
2026-05-28 8:55 ` Christoph Hellwig
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=ahgC1PDFtFrJrsKC@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=david.laight.linux@gmail.com \
--cc=linan122@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-raid@vger.kernel.org \
--cc=rppt@kernel.org \
--cc=song@kernel.org \
--cc=xiao@kernel.org \
--cc=yukuai@fnnas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.