From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933439AbeAYDob (ORCPT ); Wed, 24 Jan 2018 22:44:31 -0500 Received: from mail-pf0-f177.google.com ([209.85.192.177]:41861 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933218AbeAYDoa (ORCPT ); Wed, 24 Jan 2018 22:44:30 -0500 X-Google-Smtp-Source: AH8x225uGdG70TAaPjX3fhlzD7yJjGDIu2QhcnhtPPNhkowmGB17cOciC9U38MVSQOLzMqHMwqduQA== Subject: Re: [PATCH 1/2] block: blk-tag: Replace GFP_ATOMIC with GFP_KERNEL in __blk_queue_init_tags To: Jia-Ju Bai Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <1516851525-6828-1-git-send-email-baijiaju1990@gmail.com> From: Jens Axboe Message-ID: <7b20dc97-9240-726a-5664-c40c9421ef61@kernel.dk> Date: Wed, 24 Jan 2018 20:44:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0 MIME-Version: 1.0 In-Reply-To: <1516851525-6828-1-git-send-email-baijiaju1990@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/24/18 8:38 PM, Jia-Ju Bai wrote: > After checking all possible call chains to kmalloc here, > my tool finds that kmalloc is never 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. These two look OK to me, mostly. One issue is that blk_queue_init_tags() can be used to resize tags, in which case it's called with the queue lock held. Nobody is using it like that anymore, though. So I'd prefer if you did a v2 of this patch, and include a correction to that comment. -- Jens Axboe