Re: [PATCH] PCI: Fix issue with "pci=disable_acs_redir" parameter being ignored
From: Logan Gunthorpe
Date: Fri Apr 05 2019 - 18:11:54 EST
On 2019-04-05 3:39 p.m., Bjorn Helgaas wrote:
>> -static const char *disable_acs_redir_param;
>> +static char disable_acs_redir_param[COMMAND_LINE_SIZE];
> I certainly acknowledge the problem, but I'm a little hesitant to add
> a static buffer of 256-4096 bytes (2048 on x86, arm64, powerpc, sparc)
> for a relatively low-usage situation. The memory usage doesn't seem
> in proportion to the value-add.
> Ugh, and we allocate another similar buffer for
> resource_alignment_param, which I would guess is also rarely used.
Yeah, I was looking for a better solution and eventually decided to just
copy what was done in the past.
> Since disable_acs_redir_param and resource_alignment_param are
> both read-only and big enough to hold the entire command line, we
> should be able to share a single buffer between them if we made the
> parsers a little smarter.
That sounds like a good idea that I didn't think of. If I can't find
something better, I'll do that.
> In fact, I bet there's already a static
> copy lying around somewhere for /proc/cmdline.
There are lots of copies of cmdline around, but none that are available
for early param. I did a sampling of some of the other early params but
none seem to be anywhere near as complex as the PCI one and I haven't
yet found one that needs to keep a copy of any or all of the command line.
In any case, I'll keep digging and try to get a better patch for you