Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp768585imp; Thu, 21 Feb 2019 10:46:10 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia6toYIYK29gt8Tcjp5qYurup2lspU0VPnRnoio7WRIXWykIe9mwFZ9hZ+d0dA5zrEp6ANg X-Received: by 2002:aa7:9099:: with SMTP id i25mr42119539pfa.102.1550774770832; Thu, 21 Feb 2019 10:46:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550774770; cv=none; d=google.com; s=arc-20160816; b=FRMksuqygCP56TJLeehm2ByErRHye+eNj1Fru1KJyl6OBfW0P1g5JhCe2a5Ckyk3/1 w+pLaYoGTf9GLLcwcuHqkHF/SOdEH8uLJvLJLIcRorRWyDMHaDHA685fLTCB45df83ah KMETeAomPRFRjr0rktP+1XuEQly/IVhWOn1hpnUx8Mqf1hZYfR4aTpJMWUXNHWdDGFri YVoS524hLyrgfzs1mi5F/4Jdnug3TeQTYc7OW4xhymfQIa7zVOdwEWcEEpvMDrUn7wGn +GwJi+SixVRL+0niNqrCngU69BfHzHUeptEGY9CwLWNDHxQ278t45BeyjQw0IVO8jTTa s+Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=qFMnt8qZAAz9edp0BewfPgS4DYaF2p/virsaeNQXMUI=; b=TYUryVWyy3js+mKRiOMjFYr21CBQ9nLNfBkjshGtBLsfQAfxiRotptSre1Pgemi72R wUe1jt2TrCvYe/sG7SkDZRTk3dlcmiK0YjBOQKMHzHNY3HEZmTI435VzjPZ7j89VIP6Z dyzRQmZTSyzldYW91tN1wtT5hoc1U0WV/p32e9sIiOtPf8kfjhN8qhNU88DJgwqbgRTf iALabsZLwmnz4SZHcCfh6Sc1b7mHQxYjasfiU9FevPyZgmgTZIOoD43yiTg5y9Ys3YLN f40g5WWynzX3LbdlCAzTl9i+Pv9M8ZYIJRL+zQ3A6EbemCGML4joFkkTa4fHq5+B+Tuh gY7Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c15si9247089pgj.13.2019.02.21.10.45.54; Thu, 21 Feb 2019 10:46:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728353AbfBUSpY (ORCPT + 99 others); Thu, 21 Feb 2019 13:45:24 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33649 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbfBUSpX (ORCPT ); Thu, 21 Feb 2019 13:45:23 -0500 Received: by mail-pg1-f196.google.com with SMTP id h11so11807048pgl.0; Thu, 21 Feb 2019 10:45:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=qFMnt8qZAAz9edp0BewfPgS4DYaF2p/virsaeNQXMUI=; b=E8KDb3vejt9qlIdtKZdHI3OWnSFtRkOWIl5opgJFZKAPwQ4fPK7a9FchR1hhOfNO5r d7ndRtAW8rIYTOw/f1GnECP8cAgd8cyq5y/JGjwEKSE1KwSt6SctfvbmPsWNEWpi+87j EOiJPZQcF1URYooy9gsYugcFzcht+HB9NiXnkPYp0h3BGq3KFxN99B3j2s1GWqSeQc8c Xm0vaNIfE7HB1tSgR4UjZXBwI74/qrOAEcc9EOMcTa2xJ1qCo6c6zk6PBCDZuupVSyIP bxJPRb2NjmkMSRvDhq24NBKgmx9H49qCsNsPftUNEyMLFSOo+0xDfj2/EiYuAm7y/N7m Bn1g== X-Gm-Message-State: AHQUAuYYaj05l3omPt25PhfCdFgiv0s/hkrit/+BJU2Pbx+WZgcB2viI rg3J+uC1IyV1HEzw+n+ByeY= X-Received: by 2002:a63:80c7:: with SMTP id j190mr20782732pgd.357.1550774722644; Thu, 21 Feb 2019 10:45:22 -0800 (PST) Received: from ?IPv6:2620:15c:2cd:203:5cdc:422c:7b28:ebb5? ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id p11sm13171429pfi.10.2019.02.21.10.45.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Feb 2019 10:45:21 -0800 (PST) Message-ID: <1550774719.31902.137.camel@acm.org> Subject: Re: [PATCH v2 1/2] scsi: replace GFP_ATOMIC with GFP_KERNEL for allocations in scsi_scan.c From: Bart Van Assche To: Benjamin Block , "James E . J . Bottomley" , "Martin K . Petersen" Cc: Steffen Maier , linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 21 Feb 2019 10:45:19 -0800 In-Reply-To: References: <20190220184847.24640-1-bblock@linux.ibm.com> Content-Type: text/plain; charset="UTF-7" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-02-21 at 10:18 +-0100, Benjamin Block wrote: +AD4 Looking at the code of scsi+AF8-alloc+AF8-sdev(), and all the calling contexts, +AD4 there seems to be no reason to use GFP+AF8-ATMOIC here. All the different +AD4 call-contexts use a mutex at some point, and nothing in between that +AD4 requires no sleeping, as far as I could see. Additionally, the code that +AD4 later allocates the block queue for the device (scsi+AF8-mq+AF8-alloc+AF8-queue()) +AD4 already uses GFP+AF8-KERNEL. +AD4 +AD4 +AD4 +AFs ... +AF0 +AD4 +AD4 So replace all these, and give them a bit of a better chance to succeed, +AD4 with more chances of reclaim. Reviewed-by: Bart Van Assche +ADw-bvanassche+AEA-acm.org+AD4