lkml.org 
[lkml]   [2015]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2][RESEND] perf, x86: Fix multi-segment problem of perf_event_intel_uncore
On Tue, Sep 01, 2015 at 01:31:47PM +0200, Ingo Molnar wrote:
>
> * Peter Zijlstra <peterz@infradead.org> wrote:
>
> > +struct __find_pci2phy(int segment)
> > +{
> > + struct pci2phy_map *map;
> > +
> > + lockdep_assert_held(&pci2phy_map_lock);
> > +
> > + list_for_each_entry(map, &pci2phy_map_head, list) {
> > + if (map->segment == segment)
> > + return map;
> > + }
> > +
> > + map = kmalloc(sizeof(struct pci2phy_map), GFP_ATOMIC);
>
> I really don't think we should be adding new GFP_ATOMIC allocations whenever it
> can be avoided.

I tend to agree, it makes the whole thing rather fragile...


\
 
 \ /
  Last update: 2015-09-01 14:01    [W:0.033 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site