From: Leo Yan <leo.yan@linaro.org>
To: James Clark <james.clark@arm.com>
Cc: Shuai Xue <xueshuai@linux.alibaba.com>,
alexander.shishkin@linux.intel.com, peterz@infradead.org,
kirill@shutemov.name, mingo@redhat.com, acme@kernel.org,
mark.rutland@arm.com, jolsa@kernel.org, namhyung@kernel.org,
irogers@google.com, adrian.hunter@intel.com,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH 2/2] perf/ring_buffer: Fix high-order allocations for AUX space with correct MAX_ORDER limit
Date: Mon, 12 Jun 2023 17:09:37 +0800 [thread overview]
Message-ID: <20230612090937.GD217089@leoy-huanghe.lan> (raw)
In-Reply-To: <751cb217-4be0-ddfc-780b-87517a8e337a@arm.com>
On Mon, Jun 12, 2023 at 09:45:38AM +0100, James Clark wrote:
[...]
> > @@ -609,8 +609,8 @@ static struct page *rb_alloc_aux_page(int node, int order)
> > {
> > struct page *page;
> >
> > - if (order > MAX_ORDER)
> > - order = MAX_ORDER;
> > + if (order >= MAX_ORDER)
> > + order = MAX_ORDER - 1;
> >
> > do {
> > page = alloc_pages_node(node, PERF_AUX_GFP, order);
>
>
> It seems like this was only just recently changed with this as the
> commit message (23baf83):
>
> mm, treewide: redefine MAX_ORDER sanely
>
> MAX_ORDER currently defined as number of orders page allocator
> supports: user can ask buddy allocator for page order between 0 and
> MAX_ORDER-1.
>
> This definition is counter-intuitive and lead to number of bugs all
> over the kernel.
>
> Change the definition of MAX_ORDER to be inclusive: the range of
> orders user can ask from buddy allocator is 0..MAX_ORDER now.
>
> It might be worth referring to this in the commit message or adding a
> fixes: reference. Or maybe this new change isn't quite right?
Good point. If so, we don't need this patch anymore.
Thanks for reminding, James.
Leo
next prev parent reply other threads:[~2023-06-12 9:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 5:24 [PATCH 0/2] Fix high-order allocations for AUX space Shuai Xue
2023-06-12 5:24 ` [PATCH 1/2] perf/core: Bail out early if the request AUX area is out of bound Shuai Xue
2023-06-12 7:38 ` Leo Yan
2023-06-12 8:35 ` Shuai Xue
2023-06-12 10:05 ` Leo Yan
2023-06-12 10:25 ` Leo Yan
2023-06-13 3:00 ` Shuai Xue
2023-06-12 8:47 ` James Clark
2023-06-12 5:24 ` [PATCH 2/2] perf/ring_buffer: Fix high-order allocations for AUX space with correct MAX_ORDER limit Shuai Xue
2023-06-12 8:30 ` Leo Yan
2023-06-12 8:35 ` Shuai Xue
2023-06-12 8:45 ` James Clark
2023-06-12 9:09 ` Leo Yan [this message]
2023-06-13 6:42 ` Shuai Xue
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=20230612090937.GD217089@leoy-huanghe.lan \
--to=leo.yan@linaro.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bpf@vger.kernel.org \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=xueshuai@linux.alibaba.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