Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1216784
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2][RESEND] perf, x86: Fix multi-segment problem of perf_event_intel_uncore |
| Date | 2015-09-01 13:40 +0200 |
| Message-ID | <q3S4W-5ix-19@gated-at.bofh.it> (permalink) |
| References | <q1UDU-6OO-17@gated-at.bofh.it> <q3RLz-4Wc-11@gated-at.bofh.it> <q3S4V-5ix-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2][RESEND] perf, x86: Fix multi-segment problem of perf_event_intel_uncore Taku Izumi <izumi.taku@jp.fujitsu.com> - 2015-08-27 04:00 +0200
Re: [PATCH v2][RESEND] perf, x86: Fix multi-segment problem of perf_event_intel_uncore Peter Zijlstra <peterz@infradead.org> - 2015-09-01 13:20 +0200
Re: [PATCH v2][RESEND] perf, x86: Fix multi-segment problem of perf_event_intel_uncore Ingo Molnar <mingo@kernel.org> - 2015-09-01 13:40 +0200
Re: [PATCH v2][RESEND] perf, x86: Fix multi-segment problem of perf_event_intel_uncore Peter Zijlstra <peterz@infradead.org> - 2015-09-01 13:40 +0200
csiph-web