lkml.org 
[lkml]   [2014]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] x86: Optimize resource lookups for ioremap
On Wed, 27 Aug 2014 16:25:24 -0700 Mike Travis <travis@sgi.com> 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?


\
 
 \ /
  Last update: 2014-08-28 02:01    [W:0.080 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site