Received: by 10.223.176.46 with SMTP id f43csp1677646wra; Wed, 24 Jan 2018 21:31:28 -0800 (PST) X-Google-Smtp-Source: AH8x225FzBrqZN+pKP7wBarT2tZUk5mPpT/I/IflUZu0bWY7crev8GSJLLhNsoc/6D52DgvDWwV0 X-Received: by 10.98.14.203 with SMTP id 72mr14836526pfo.163.1516858288287; Wed, 24 Jan 2018 21:31:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516858288; cv=none; d=google.com; s=arc-20160816; b=EfpdvaVPXk7e3+l67yL2I0Kj3FNWoY9tJCbTAKTuDL3wNgzGEhwVbew0oZAh9wDCkS uNtCdeU3SOvo946IVmH1q4A8XTuJ8zAxvCn7QADSRQUMaZEjA1NUp3ZpDZuF/7XVTQoL uG1Ux2f4ypjWvT7egSX3L9Vk11uXg7xTnWvH2QOpG0/RjxSqNA0QdFAn3X8ISKZgkQAF uq19earNdS/UUX94Vstspc9eSP5Y80gBVEOAbrLsY21elCDxzbxIoK3/nJPzpGIu7+5M H6j3OEAmN+Pe07kvaY4EjwiOjRhVnE5KJOijrWuZIE7LS5FQyASUZFUR5MwMYe0ikPga WGdg== 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:arc-authentication-results; bh=x2NajX0BnSSkGo+oHwMBO6RvfmSmv9RQqfDf/Syqgec=; b=KqlDxV4JdNZprTMr3JAhT7w/LG1/lbmCoDOzW3+AE5sUGHvXXUSPAoDnX3uQHJct8F i0epUhDeR2VUNChA0/UTGRC48d+Se50nlz4Ia1Gdx4vWUfQ0keVbiiE5snYcrWDVX/If zk1tN2K0JclWpkJfNbvKc0ECsReE/oGHsS9xlg0EmmS5mXCk/A3P48sIzbNtGHfGay5T G2Or5AHfhjWJx3VJxEHIGwFqE2SOCocHMQ45+As5ZhKglYZIrHQPy5YfGbc0LzNjQ6E2 gjcmEFek0G+vUgKZjl7SgUYQTpb5OP3pQv5hF0vDryZIPhUehH4AG0kOJ5dYoA/7Y3hS gK0w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q126si4000697pfc.334.2018.01.24.21.31.14; Wed, 24 Jan 2018 21:31:28 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751351AbeAYF3y (ORCPT + 99 others); Thu, 25 Jan 2018 00:29:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52080 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751238AbeAYF3w (ORCPT ); Thu, 25 Jan 2018 00:29:52 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 76B444B703; Thu, 25 Jan 2018 05:29:52 +0000 (UTC) Received: from ming.t460p (ovpn-12-24.pek2.redhat.com [10.72.12.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E7A217B05; Thu, 25 Jan 2018 05:29:42 +0000 (UTC) Date: Thu, 25 Jan 2018 13:29:38 +0800 From: Ming Lei To: Jens Axboe Cc: Jia-Ju Bai , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc Message-ID: <20180125052937.GA21712@ming.t460p> References: <1516848386-5720-1-git-send-email-baijiaju1990@gmail.com> <7a1809ce-c456-0d53-4d3b-2368fb19bfd8@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7a1809ce-c456-0d53-4d3b-2368fb19bfd8@kernel.dk> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 25 Jan 2018 05:29:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 24, 2018 at 08:34:14PM -0700, Jens Axboe wrote: > On 1/24/18 7:46 PM, Jia-Ju Bai wrote: > > The function ioc_create_icq here is not called in atomic context. > > Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL. > > > > This is found by a static analysis tool named DCNS written by myself. > > But it's running off the IO submission path, so by definition the GFP > mask cannot include anything that will do IO. GFP_KERNEL will make > it deadlock prone. > > It could be GFP_NOIO, but that's also overlooking the fact that we can > have preemption disabled here. We have REQ_NOWAIT request too, so GFP_NOIO isn't OK too. -- Ming