From: Mike Rapoport <rppt@kernel.org>
To: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexandra Winter <wintera@linux.ibm.com>,
Aswin Karuvally <aswin@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Harald Freudenberger <freude@linux.ibm.com>,
Holger Dengler <dengler@linux.ibm.com>,
Jan Hoeppner <hoeppner@linux.ibm.com>,
Stefan Haberland <sth@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH 0/6] s390/drivers: replace __get_free_pages() call with kmalloc()
Date: Thu, 28 May 2026 18:16:28 +0300 [thread overview]
Message-ID: <ahhcTBxuT154MmNI@kernel.org> (raw)
In-Reply-To: <894c759b-fe6c-4dfe-8b60-3b74916498c6-agordeev@linux.ibm.com>
On Thu, May 28, 2026 at 04:48:41PM +0200, Alexander Gordeev wrote:
> On Thu, May 28, 2026 at 10:09:48AM +0300, Mike Rapoport (Microsoft) wrote:
>
> Hi Mike,
>
> > This is a (tiny) part of larger work of replacing page allocator calls
> > with kmalloc.
> >
> > Nowadays the right way to say "I need a buffer" is kmalloc() rather than
> > ancient and ugly __get_free_pages().
> >
> > Also in git:
> > https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git gfp-to-kmalloc/s390-drivers
> >
> > ---
> > Mike Rapoport (Microsoft) (6):
> > s390/con3270: replace __get_free_page() with kmalloc()
> > s390/dasd: replace get_zeroed_page() with kzalloc()
> > s390/hvc_iucv: replace get_zeroed_page() with kzalloc()
> > s390/qeth: replace get_zeroed_page() with kzalloc()
> > s390/trng: replace __get_free_page() with kmalloc()
> > s390/zcrypt: replace get_zeroed_page() with kzalloc()
> >
> > drivers/char/hw_random/s390-trng.c | 5 +++--
> > drivers/s390/block/dasd_eckd.c | 12 ++++++------
> > drivers/s390/block/dasd_eer.c | 4 ++--
> > drivers/s390/char/con3270.c | 8 ++++----
> > drivers/s390/crypto/zcrypt_api.c | 6 +++---
> > drivers/s390/net/qeth_core_main.c | 4 ++--
> > drivers/tty/hvc/hvc_iucv.c | 6 +++---
> > 7 files changed, 23 insertions(+), 22 deletions(-)
>
> Did you use a particular tool/script to identify these locations?
> The immediat question would by why these sources only and not the
> others that also use the old functions?
I used an LLM to identify "the most safe callers to convert" to being with.
Since every call site requires a manual review of the surrounding code and
the actual usage, for the first round I limited the changes to allocations
that are temporary or staging buffers.
With a less restrictive prompt I've got 57 patches to s390 (both arch/ and
drivers/), bu that's too much for me to chew in a single setting :)
If you are curious, overall changes (before the human review) are here:
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/log/?h=gfp-to-kmalloc/v0.2
> Thanks!
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-05-28 15:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 7:09 [PATCH 0/6] s390/drivers: replace __get_free_pages() call with kmalloc() Mike Rapoport (Microsoft)
2026-05-28 7:09 ` [PATCH 1/6] s390/con3270: replace __get_free_page() " Mike Rapoport (Microsoft)
2026-05-29 10:26 ` Heiko Carstens
2026-05-28 7:09 ` [PATCH 2/6] s390/dasd: replace get_zeroed_page() with kzalloc() Mike Rapoport (Microsoft)
2026-05-29 10:15 ` Heiko Carstens
2026-05-31 10:35 ` Mike Rapoport
2026-05-28 7:09 ` [PATCH 3/6] s390/hvc_iucv: " Mike Rapoport (Microsoft)
2026-05-29 10:26 ` Heiko Carstens
2026-05-28 7:09 ` [PATCH 4/6] s390/qeth: " Mike Rapoport (Microsoft)
2026-05-28 14:17 ` Alexandra Winter
2026-05-29 10:23 ` Heiko Carstens
2026-05-31 10:17 ` Mike Rapoport
2026-05-29 11:09 ` Heiko Carstens
2026-05-29 11:15 ` Vlastimil Babka (SUSE)
2026-05-28 7:09 ` [PATCH 5/6] s390/trng: replace __get_free_page() with kmalloc() Mike Rapoport (Microsoft)
2026-05-29 10:29 ` Heiko Carstens
2026-05-28 7:09 ` [PATCH 6/6] s390/zcrypt: replace get_zeroed_page() with kzalloc() Mike Rapoport (Microsoft)
2026-05-29 8:29 ` Harald Freudenberger
2026-05-29 10:28 ` Heiko Carstens
2026-05-28 14:48 ` [PATCH 0/6] s390/drivers: replace __get_free_pages() call with kmalloc() Alexander Gordeev
2026-05-28 15:16 ` Mike Rapoport [this message]
2026-05-29 6:21 ` Alexander Gordeev
2026-05-29 7:13 ` Mike Rapoport
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=ahhcTBxuT154MmNI@kernel.org \
--to=rppt@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=aswin@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=dengler@linux.ibm.com \
--cc=freude@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hoeppner@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sth@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=wintera@linux.ibm.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.