Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Song Liu <song@kernel.org>, Yu Kuai <yukuai@fnnas.com>,
	Li Nan <linan122@huawei.com>, Xiao Ni <xiao@kernel.org>,
	David Laight <david.laight.linux@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-raid@vger.kernel.org
Subject: Re: [PATCH v2 2/2] lib/raid6: use kvmalloc() in raid6_select_algo()
Date: Wed, 27 May 2026 14:28:26 +0300	[thread overview]
Message-ID: <ahbVWp9L7ASV6zOL@kernel.org> (raw)
In-Reply-To: <20260527063814.GA17042@lst.de>

On Wed, May 27, 2026 at 08:38:14AM +0200, Christoph Hellwig wrote:
> On Tue, May 26, 2026 at 10:34:24AM -0700, Andrew Morton wrote:
> >  	/* prepare the buffer and fill it circularly with gfmul table */
> > -	disk_ptr = (char *)__get_free_pages(GFP_KERNEL, RAID6_TEST_DISKS_ORDER);
> > +	disk_ptr = kvmalloc(PAGE_SIZE * RAID6_TEST_DISKS, GFP_KERNEL);
> 
> This changes to vmalloc for no good reason.  It also doesn't use

TBH, I didn't look around and just presumed that order-3 allocation is a
good candidate for vmalloc(). 
But given this runs early on boot, there's no real reason for vmalloc().

> the _array version for overflow-safe multiplying (not that it matters
> much here..)
 
Can do _array if you'd like, no strong feelings here.

-- 
Sincerely yours,
Mike.

  reply	other threads:[~2026-05-27 11:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 12:50 [PATCH v2 0/2] lib/raid: replace __get_free_pages() call with kvmalloc() Mike Rapoport (Microsoft)
2026-05-26 12:50 ` [PATCH v2 1/2] lib/raid: use kvmalloc() in calibrate_xor_blocks() Mike Rapoport (Microsoft)
2026-05-27  7:32   ` Christoph Hellwig
2026-05-26 12:50 ` [PATCH v2 2/2] lib/raid6: use kvmalloc() in raid6_select_algo() Mike Rapoport (Microsoft)
2026-05-26 17:34   ` Andrew Morton
2026-05-27  6:38     ` Christoph Hellwig
2026-05-27 11:28       ` Mike Rapoport [this message]
2026-05-27  7:33   ` 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=ahbVWp9L7ASV6zOL@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david.laight.linux@gmail.com \
    --cc=hch@lst.de \
    --cc=linan122@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-raid@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox