Received: by 10.223.185.116 with SMTP id b49csp3824736wrg; Tue, 13 Feb 2018 08:18:06 -0800 (PST) X-Google-Smtp-Source: AH8x225in4a8bjvarEldBa9ywNkBPHlw/b/VB5PRXggY+O90d6WMpHPY08Ksch4zOgGGLB7W3k32 X-Received: by 10.99.109.70 with SMTP id i67mr1413869pgc.190.1518538686138; Tue, 13 Feb 2018 08:18:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518538686; cv=none; d=google.com; s=arc-20160816; b=sBrMD8qVWNCX9EuC0xyLXpgOusQqJuui98oyyVr2kd2kqv7ta8i7R14HJbXzQPD/Yu Hgpb/hWlp3wYqmCIZ3OYQYthc15zAIy3sXPNV30c7/4Qzj8V7InQ3aSkejI0MOikfYxh JcUEk5Hqk7l5A+fUjBv7BE58oC8GEVLghIRbHwqKM8kX7/atefpc8Pz9rZacfk+t6dWo nkhHtv9dRnmK6xYuqmPwDvH7QoZfYLLpNdswOBHz/+hmfaZh984QN9hzZtyS3FvQTwwB 46NXNUErRis67r4okvpfqOVuFDgr/lNsvZzShRyFbFIqB/spuzZd4EMZJFQqTd2s4VCj wwwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=M24TwwPQ7cQgcqmevMAGtonpCmjVPHwUcpu6oAhwpCM=; b=a4AozsCsdFD6y193TLebWaWhRZvIWOeag2VSNEEHHNmlQcFb8Rba2bbYFW+xfCZGmX Lw6TtFsELjKKJRIeI3ntvsEcAY8CEpt3tIHbnLsJV5vHnZwjxYIIPr5qnKjrch0BPKtF EOUd3SDl2uhg41e5JNBOVcR0rFHcuc4LhXKCxvygQzB+AvHADLqlx5SdA4PFtXLMRuH0 73Pbd3rIAsLNFmUSlTZeY5g+SHp57L9M6wLK85vD6VOSdS8EHHhqukbjBB767z8J7Kqy pmoi8XIzTqAJ+Qm2hZB8tYpjWVPKbLB6uZgFKLe9XxrQyvJf3ySWEwk3zId47zK7yBQ3 /o0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=UBkMo82v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10-v6si1123146plp.698.2018.02.13.08.17.50; Tue, 13 Feb 2018 08:18:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=UBkMo82v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934503AbeBMQRF (ORCPT + 99 others); Tue, 13 Feb 2018 11:17:05 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:44880 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933698AbeBMQRE (ORCPT ); Tue, 13 Feb 2018 11:17:04 -0500 Received: by mail-wr0-f196.google.com with SMTP id v65so12368470wrc.11 for ; Tue, 13 Feb 2018 08:17:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=M24TwwPQ7cQgcqmevMAGtonpCmjVPHwUcpu6oAhwpCM=; b=UBkMo82vzmZan9XR32tRnxj9Po/Xut6mKovyh5GPw8CTfqmrNTXpKPxCMg+pjYDfTD JPBYWMlpQkThzZoewK+jiUKn3DfbuVwifgWcpobLUyDr288kq+PAbv7g5TgT2HyBVzDD JSo8sbUgdUvFpOOw6faqxbEdccU10KRnjTTugxLWicEOS9PI/OZXu8C/wDiShraHjGaq hvgQnI3bOIRo26Z+MTMZSKZ5KuBNQegNicMNkctMrZBhcLa1r31dYtpFPBqobeEz2uZy c80AFX63/492lxGlleVABPTl/IMAIhObURzSNDLo/GHbiFj+xnijA7tentnP1kPyP9Y6 lyvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=M24TwwPQ7cQgcqmevMAGtonpCmjVPHwUcpu6oAhwpCM=; b=O0WdlEgprWvi7qJVUz7ntPEtZ/5bVNiD8LbflNXGcvxigK8VMRwGhqDTJ40LMOQ7J3 v8syggJOoN32nyzlRJkNsTmAzk1S2MTFWZxiqWYCDZZXzGZn7v87om1GuyZZPMeIaly6 RzrhwbI9PdWwKpiQWUuUYruoXmFfUW7JuGkTCMjzz/MGMSQFn54XWwsGifUV6h2OXEG4 vgMXVOeBqP1+Tl+DZ/hpGxdcarnhjYl6/+MspMHyAYcehRdWXrnyU2wKr2SqoEX06kV2 Y5gohQ/+VLpVnOT+wGTV2ZDpwEIXxum77nuuNXspg/iakmzqCPHhzp1OChf45y7ijHcS kh3w== X-Gm-Message-State: APf1xPAMUuJNfoXbg2zpcR0UucgIB/mRUI04kuYsIBQqMLjfV/0sl7QZ IGaiVVU1q1y0r0FsiIYGxoI= X-Received: by 10.223.132.166 with SMTP id 35mr1715401wrg.183.1518538622853; Tue, 13 Feb 2018 08:17:02 -0800 (PST) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id l9sm25505898wrl.1.2018.02.13.08.17.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 08:17:02 -0800 (PST) Date: Tue, 13 Feb 2018 17:16:59 +0100 From: Ingo Molnar To: Thomas Gleixner Cc: Jia-Ju Bai , mingo@redhat.com, hpa@zytor.com, jgross@suse.com, douly.fnst@cn.fujitsu.com, kkamagui@gmail.com, gregkh@linuxfoundation.org, mka@chromium.org, linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH] kernel: x86: apic: Replace GFP_ATOMIC with GFP_KERNEL in __add_pin_to_irq_node Message-ID: <20180213161659.aribhtrooupdv4m4@gmail.com> References: <1516758015-7236-1-git-send-email-baijiaju1990@gmail.com> <20180213155604.62ulolc34snh5n3p@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Thomas Gleixner wrote: > On Tue, 13 Feb 2018, Ingo Molnar wrote: > > * Jia-Ju Bai wrote: > > > > > The function __add_pin_to_irq_node is not called in atomic context. > > > Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. > > > > > > Signed-off-by: Jia-Ju Bai > > > --- > > > arch/x86/kernel/apic/io_apic.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c > > > index 201579d..665c013 100644 > > > --- a/arch/x86/kernel/apic/io_apic.c > > > +++ b/arch/x86/kernel/apic/io_apic.c > > > @@ -379,7 +379,7 @@ static int __add_pin_to_irq_node(struct mp_chip_data *data, > > > if (entry->apic == apic && entry->pin == pin) > > > return 0; > > > > > > - entry = kzalloc_node(sizeof(struct irq_pin_list), GFP_ATOMIC, node); > > > + entry = kzalloc_node(sizeof(struct irq_pin_list), GFP_KERNEL, node); > > > if (!entry) { > > > pr_err("can not alloc irq_pin_list (%d,%d,%d)\n", > > > node, apic, pin); > > > > NAK: this is called in an atomic section: with IRQs disabled ... > > The only invocation where this happens with IRQs disabled is the early > check_timer() code which runs _before_ the scheduler is working. GFP_KERNEL > is valid during that phase. All other call sites have interrupts enabled. Yeah, so at minimum there's a mismatch between the changelog: > > > The function __add_pin_to_irq_node is not called in atomic context. ... and actual behavior. What you wrote should be part of the changelog I suspect. Thanks, Ingo