From: Rohit Agarwal <rohiagar@chromium.org>
To: "Winkler, Tomas" <tomas.winkler@intel.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Lubart, Vitaly" <vitaly.lubart@intel.com>,
"Usyskin, Alexander" <alexander.usyskin@intel.com>
Subject: Re: [RFC] Order 4 allocation failures in the MEI client driver
Date: Tue, 24 Sep 2024 11:15:31 +0530 [thread overview]
Message-ID: <6ff0dd7c-0548-4d59-8a32-747b4869e7b9@chromium.org> (raw)
In-Reply-To: <PH7PR11MB7605F68E96E24CEF6C92F8AAE58F2@PH7PR11MB7605.namprd11.prod.outlook.com>
On 23/08/24 2:30 AM, Winkler, Tomas wrote:
>>>> On Wed, Aug 21, 2024, at 05:20, Rohit Agarwal wrote:
>>>>> On 19/08/24 6:45 PM, Arnd Bergmann wrote:
>>>>>> On Tue, Aug 13, 2024, at 10:45, Rohit Agarwal wrote:
>>>>>>
>>>>>> What is the call chain you see in the kernel messages? Is it
>>>>>> always the same?
>>>>> Yes the call stack is same everytime. This is the call stack
>>>>>
>>>>> <4>[ 2019.101352] dump_stack_lvl+0x69/0xa0 <4>[ 2019.101359]
>>>>> warn_alloc+0x10d/0x180 <4>[ 2019.101363]
>>>>> __alloc_pages_slowpath+0xe3d/0xe80
>>>>> <4>[ 2019.101366] __alloc_pages+0x22f/0x2b0 <4>[ 2019.101369]
>>>>> __kmalloc_large_node+0x9d/0x120 <4>[ 2019.101373] ?
>>>>> mei_cl_alloc_cb+0x34/0xa0 <4>[ 2019.101377] ?
>>>>> mei_cl_alloc_cb+0x74/0xa0 <4>[ 2019.101379] __kmalloc+0x86/0x130
>>>>> <4>[ 2019.101382] mei_cl_alloc_cb+0x74/0xa0 <4>[ 2019.101385]
>>>>> mei_cl_enqueue_ctrl_wr_cb+0x38/0x90
>>>> Ok, so this might be a result of mei_cl_enqueue_ctrl_wr_cb() doing
>>>>
>>>> /* for RX always allocate at least client's mtu */
>>>> if (length)
>>>> length = max_t(size_t, length, mei_cl_mtu(cl));
>>>>
>>>> which was added in 3030dc056459 ("mei: add wrapper for queuing
>>>> control commands."). All the callers seem to be passing a short
>>>> "length" of just a few bytes, but this would always extend it to
>>>> cl->me_cl->props.max_msg_length in mei_cl_mtu().
>>>>
>>>> Not sure where that part is set.
>>> It's allocating maximum header for receiving buffer so it can
>>> accommodate any response.
>>> Looks like this part can be optimized with pre allocated buffer pool.
>> I understand that it's always trying to allocate the maximum, the question is
>> whether there is ever a need to set the maximum to more than a page. Pre-
>> allocating a buffer at probe time would also address the issue, but if it's
>> possible to just make that buffer smaller, it wouldn't be needed.
>>
>> Is the 64KB buffer size part of the Chrome specific interface as well, or is that
>> part of the upstream kernel implementation?
> The upstream solution is for newer graphics cards and overall implementation is different.
> I'm trying to collect more information myself, it's summer vacation time, so it will take few days.
> Thanks
> Tomas
>
A gentle reminder.
Thanks,
Rohit.
next prev parent reply other threads:[~2024-09-24 5:45 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
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 [this message]
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=6ff0dd7c-0548-4d59-8a32-747b4869e7b9@chromium.org \
--to=rohiagar@chromium.org \
--cc=alexander.usyskin@intel.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tomas.winkler@intel.com \
--cc=vitaly.lubart@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®