Re: [PATCH 1/2] x86: Optimize resource lookups for ioremap

From: Andrew Morton
Date: Wed Aug 27 2014 - 19:37:54 EST


On Wed, 27 Aug 2014 16:25:24 -0700 Mike Travis <travis@xxxxxxx> wrote:

> >
> > <looks at the code>
> >
> > Doing strcmp("System RAM") is rather a hack. Is there nothing in
> > resource.flags which can be used? Or added otherwise?
>
> I agree except this mimics the page_is_ram function:
>
> while ((res.start < res.end) &&
> (find_next_iomem_res(&res, "System RAM", true) >= 0)) {

Yeah. Sigh.

> So it passes the same literal string which then find_next does the
> same strcmp on it:
>
> if (p->flags != res->flags)
> continue;
> if (name && strcmp(p->name, name))
> continue;
>
> I should add back in the check to insure name is not NULL.

If we're still at 1+ hours then little bodges like this are nowhere
near sufficient and sterner stuff will be needed.

Do we actually need the test? My googling turns up zero instances of
anyone reporting the "ioremap on RAM pfn" warning.

Where's the rest of the time being spent?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/