From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755585AbbIALbx (ORCPT ); Tue, 1 Sep 2015 07:31:53 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:34547 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755436AbbIALbw (ORCPT ); Tue, 1 Sep 2015 07:31:52 -0400 Date: Tue, 1 Sep 2015 13:31:47 +0200 From: Ingo Molnar To: Peter Zijlstra Cc: Taku Izumi , linux-kernel@vger.kernel.org, mingo@redhat.com, acme@kernel.org, hpa@zytor.com, x86@kernel.org, jolsa@redhat.com Subject: Re: [PATCH v2][RESEND] perf, x86: Fix multi-segment problem of perf_event_intel_uncore Message-ID: <20150901113147.GA11161@gmail.com> References: <1440672872-129663-1-git-send-email-izumi.taku@jp.fujitsu.com> <20150901111533.GQ19282@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150901111533.GQ19282@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra 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. Thanks, Ingo