From: "Arnd Bergmann" <arnd@arndb.de>
To: "Rohit Agarwal" <rohiagar@chromium.org>,
"Tomas Winkler" <tomas.winkler@intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] Order 4 allocation failures in the MEI client driver
Date: Mon, 19 Aug 2024 15:15:58 +0200 [thread overview]
Message-ID: <75f758e5-a26f-4f41-8009-288ca2a4d182@app.fastmail.com> (raw)
In-Reply-To: <20240813084542.2921300-1-rohiagar@chromium.org>
On Tue, Aug 13, 2024, at 10:45, Rohit Agarwal wrote:
> Hi All,
>
> I am seeing an inconsistent allocation (kmalloc) failure in the mei
> client driver [1]
> in chromebooks. The crash indicates the driver is requesting for an
> order 4 allocation
> that is unavailable at that particular snapshot of the system.
>
> I am new to this and do not know the history behind the roundup to order
> 4 [2]. According to the sources, order 4 allocations are not guaranteed and
> should be avoided most of the time. And considering the chromebooks
> limited memory, this may become an expected behavior.
I don't see how that commit is related to the failure in
mei_cl_alloc_cb(), that one only rounds the size up to a multiple
of four bytes.
What is the call chain you see in the kernel messages? Is it
always the same?
> Can we have more details on this as to why order 4 allocation is
> required? Or can we have a lower order allocation request that can be
> helpful for low memory platforms?
>
> Some solutions that I explored and weren't applicable/helpful here:
> 1. using a vmalloc/kvmalloc instead of kmalloc (Due to DMA usage).
> 2. using a scatter gather list (Would require a lot of rework in the
> driver and still
> not sure if that would work as it would require changes in the
> underlying layer as well)
> 3. retry mechanism (would help in few instances only).
> 4. allocating from the DMA pool?
Those (1, 2 and 4) would have been my suggestions as well ;-)
I don't think 4 helps on x86 machines though, since there
is no CMA area (and there should not need to be either).
If this happens during runtime (after the system is alredy
fully booted), another idea would be to move the allocation
to boot time where it is very likely to succeed and just never
free it again. Whether that works or not depends on the
exact call chain.
Allocating 64KB of consecutive pages repeatedly is clearly
a problem at runtime, but having a single allocation during
probe time is not as bad.
Arnd
next prev parent reply other threads:[~2024-08-19 13:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-13 8:45 Rohit Agarwal
2024-08-19 13:15 ` Arnd Bergmann [this message]
2024-08-19 16:46 ` Winkler, Tomas
[not found] ` <4d6f3331-5a9c-46f2-8e27-3484ba6f6eab@chromium.org>
2024-08-21 11:17 ` Arnd Bergmann
2024-08-22 13:27 ` Winkler, Tomas
2024-08-22 16:39 ` Arnd Bergmann
2024-08-22 21:00 ` Winkler, Tomas
2024-09-24 5:45 ` Rohit Agarwal
2024-09-25 10:30 ` Usyskin, Alexander
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=75f758e5-a26f-4f41-8009-288ca2a4d182@app.fastmail.com \
--to=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rohiagar@chromium.org \
--cc=tomas.winkler@intel.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
all inboxes | Powered by JetHome®