From: Luis Chamberlain <mcgrof@kernel.org>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: linux-modules@vger.kernel.org
Subject: Re: [PATCH 5/5] libkmod: Use kernel decompression when available
Date: Tue, 6 Jun 2023 11:38:35 -0700 [thread overview]
Message-ID: <ZH99K7CwPQrykkIf@bombadil.infradead.org> (raw)
In-Reply-To: <20230601224001.23397-6-lucas.de.marchi@gmail.com>
On Thu, Jun 01, 2023 at 03:40:01PM -0700, Lucas De Marchi wrote:
> With the recent changes to bypass loading the file it's possible to
> reduce the work in userspace and delegating it to the kernel. Without
> any compression to illustrate:
>
> Before:
> read(3, "\177ELF\2\1", 6) = 6
> lseek(3, 0, SEEK_SET) = 0
> newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=238592, ...}, AT_EMPTY_PATH) = 0
> mmap(NULL, 238592, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd85cbd1000
> finit_module(3, "", 0) = 0
> munmap(0x7fd85cbd1000, 238592) = 0
> close(3) = 0
>
> After:
> read(3, "\177ELF\2\1", 6) = 6
> lseek(3, 0, SEEK_SET) = 0
> finit_module(3, "", 0) = 0
> close(3) = 0
It's not clear to me how the patches did the above, in particular
avoiding the newfstatat() for the non-decompression use case.
Luis
next prev parent reply other threads:[~2023-06-06 18:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 22:39 [PATCH 0/5] libkmod: Use kernel decompression support Lucas De Marchi
2023-06-01 22:39 ` [PATCH 1/5] libkmod: Do not inititialize file->memory on open Lucas De Marchi
2023-06-06 18:24 ` Luis Chamberlain
2023-06-01 22:39 ` [PATCH 2/5] libkmod: Extract finit_module vs init_module paths Lucas De Marchi
2023-06-06 18:27 ` Luis Chamberlain
2023-06-01 22:39 ` [PATCH 3/5] libkmod: Keep track of compression type Lucas De Marchi
2023-06-06 18:28 ` Luis Chamberlain
2023-06-01 22:40 ` [PATCH 4/5] libkmod: Keep track of in-kernel compression support Lucas De Marchi
2023-06-06 18:29 ` Luis Chamberlain
2023-06-06 18:30 ` Luis Chamberlain
2023-06-01 22:40 ` [PATCH 5/5] libkmod: Use kernel decompression when available Lucas De Marchi
2023-06-06 18:38 ` Luis Chamberlain [this message]
2023-06-06 19:01 ` Lucas De Marchi
2023-07-24 13:28 ` [PATCH 0/5] libkmod: Use kernel decompression support Lucas De Marchi
-- strict thread matches above, loose matches on Subject: below --
2023-06-15 9:36 [PATCH 5/5] libkmod: Use kernel decompression when available Emil Velikov
2023-06-15 10:09 ` Emil Velikov
2023-06-27 14:05 ` Lucas De Marchi
2023-06-16 5:12 ` Lucas De Marchi
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=ZH99K7CwPQrykkIf@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.de.marchi@gmail.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