[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b894f15-6876-8598-def5-8113df836750@amd.com>
Date: Fri, 2 Jun 2017 09:20:54 -0500
From: Tom Lendacky <thomas.lendacky@....com>
To: Michal Hocko <mhocko@...nel.org>
Cc: linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: strange PAGE_ALLOC_COSTLY_ORDER usage in xgbe_map_rx_buffer
On 5/31/2017 11:04 AM, Michal Hocko wrote:
> Hi Tom,
Hi Michal,
> I have stumbled over the following construct in xgbe_map_rx_buffer
> order = max_t(int, PAGE_ALLOC_COSTLY_ORDER - 1, 0);
> which looks quite suspicious. Why does it PAGE_ALLOC_COSTLY_ORDER - 1?
> And why do you depend on PAGE_ALLOC_COSTLY_ORDER at all?
>
The driver tries to allocate a number of pages to be used as receive
buffers. Based on what I could find in documentation, the value of
PAGE_ALLOC_COSTLY_ORDER is the point at which order allocations
(could) get expensive. So I decrease by one the order requested. The
max_t test is just to insure that in case PAGE_ALLOC_COSTLY_ORDER ever
gets defined as 0, 0 would be used.
I believe there have been some enhancements relative to speed in
allocating 0-order pages recently that may make this unnecessary. I
haven't run any performance tests yet to determine if I can just go to
a 0-order allocation, though.
Thanks,
Tom
> Thanks!
>
Powered by blists - more mailing lists