From patchwork Wed May 9 07:54:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10388577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 96E6760170 for ; Wed, 9 May 2018 07:54:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 879E820223 for ; Wed, 9 May 2018 07:54:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A72E28E73; Wed, 9 May 2018 07:54:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDDE320223 for ; Wed, 9 May 2018 07:54:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 760B86B0391; Wed, 9 May 2018 03:54:48 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 710186B0393; Wed, 9 May 2018 03:54:48 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FFEC6B0394; Wed, 9 May 2018 03:54:48 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id 202136B0391 for ; Wed, 9 May 2018 03:54:48 -0400 (EDT) Received: by mail-pl0-f71.google.com with SMTP id a6-v6so3312093pll.22 for ; Wed, 09 May 2018 00:54:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=7aV9YcPWP0apzs4OoBTdbqgsdaT+YYd3PoE5qI1vrNA=; b=n8/df7eTCg9CQsKgpu1tCPnOLJsrhz1JTF/udnra6uJYWcz+ISlyGrxaeezi3PTseR mv4x2WpUnHr98396HgxJt01Iy97tKOdthpVtIEimH+xkhgMaxwf5WElGPwscvZ4Rk+ci pP7cjebgpz2+oU4oDWxYjLoTzr70Z8IKgIwixNgaU6RdtBnn/HrNb9kyC5VZl0/AFwYN r9NG4L6nQ5fHAMRsDMm7YTv5kj+HT+jQgJa7H8vlvuS3nULaFpItL78EpL5SbQQt5dj9 Hz7g2ZRKDgG2LghUJgPdMA5iNRTignUhRq1RgfxFOJAA+AMJJXNDRG2owF487rN3bRLw UaWA== X-Gm-Message-State: ALQs6tChsvYPHpvA9XUb84HkH/Lm/yNV4FIAyM2auHdVv3+Zcgji6by5 khOCVwmblnbq50+i5BXKjLHDNJIIH3TSzqVINHYV+28kKzfTjS/RdGQxML8IlEzwcPH5X3fgV37 vDnbqGQc9T7FSWUrQe8KBnmrz9DmVvR0n0ZE8dJODEHitO0+QBA98OJ7OO6MyUww= X-Received: by 2002:a17:902:76c4:: with SMTP id j4-v6mr12549617plt.257.1525852487844; Wed, 09 May 2018 00:54:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp89zL4vcaHYUSOD3X1LwzcxjNx5qpOyDrzPK2B+drf3phWafTopVpolircLrtb3AbjJHCG X-Received: by 2002:a17:902:76c4:: with SMTP id j4-v6mr12549582plt.257.1525852486979; Wed, 09 May 2018 00:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525852486; cv=none; d=google.com; s=arc-20160816; b=QIwv563SjcYQDAWwvBKjIM/56fhXxbfTkxoQYpC00X1DvY797L3xxqQU2bQ/PcLYkF PLrdVW67R+aSiP3VbdByie3mnZyWDWSGfMtoKNdqvE4YDYdlWfAc2le+Z80yfb4jTHAf xJi4Ye4zPwpxkSl6QzhsyXkpy+Aon3c3BRBcwxrIyAuPdUAE1PVztPT2123/svXApYOG E6YiWNhVf9k2Pg4pz4HbdpEEfRCQ+oh/MQUEwfde8DMUuVqYCrfZc6N8uKdTGUs19/gH Wqlasd28FhQnZFExEHqBDhAu6rNbJywqOD+hIEm/NsBsmA/ueFNJSrp1wiVYpEBWSKkS Wgvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=7aV9YcPWP0apzs4OoBTdbqgsdaT+YYd3PoE5qI1vrNA=; b=LGKFSHy8AYqyJdoMg4KFI8G/hZ9TfyLF+LE/jQsbzW8zve408d0vHN6O/JcbJ9oBo8 JeaQ8E02BcPOeHnqaOOJeUdvYmuNXINPU0MfaFsyQd/T99hy/T1FAN5WxRdnv6BKWn3J wFMyGwdvQFBmL5/1tD7s8Rkhtu+oFwV1PcKJwA674+O/BTrY6S5Yb7R5/WRCZu83M1ou EqTofh2DCM5GWbij9ExkZoqZsrIunomKzIOyuA7SA8ZjIi57B40sQZtZ8sFHpVkUw7wc A+hU/q1IQoMyKk8HkT/lUxiHpYq5q2c+HXyMA7dFQh/CBmhm/K3Wo9hlCBFkbfzlJbg4 EsUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=WIzudJSB; spf=pass (google.com: best guess record for domain of batv+e0efdd19ce80d487e3da+5372+infradead.org+hch@bombadil.srs.infradead.org designates 198.137.202.133 as permitted sender) smtp.mailfrom=BATV+e0efdd19ce80d487e3da+5372+infradead.org+hch@bombadil.srs.infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [198.137.202.133]) by mx.google.com with ESMTPS id s1-v6si20950974pgb.434.2018.05.09.00.54.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 00:54:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+e0efdd19ce80d487e3da+5372+infradead.org+hch@bombadil.srs.infradead.org designates 198.137.202.133 as permitted sender) client-ip=198.137.202.133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=WIzudJSB; spf=pass (google.com: best guess record for domain of batv+e0efdd19ce80d487e3da+5372+infradead.org+hch@bombadil.srs.infradead.org designates 198.137.202.133 as permitted sender) smtp.mailfrom=BATV+e0efdd19ce80d487e3da+5372+infradead.org+hch@bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7aV9YcPWP0apzs4OoBTdbqgsdaT+YYd3PoE5qI1vrNA=; b=WIzudJSBxihO2kRAa91Wbphgt LP6QJXnwJg/yLthdvcrts7kR6/xVVCwPuoMFQGOkGAjOc5BizznVcRWePdH89Un7MgXytU2ue4Vpu LbSDd39vu2VVhV5Xazu2AnJXlatOwDez9GsG6TFjT4OeRp4MwLJjYjP/7WrQHJ7vhzlfvTjko2vSP mEn09Tc39rjl6M8QbxpxMWAEj2eS1Cggb+LxejmG4BBtG65uw612jBoJ7BW8S6dC2Bh1E25U9T8pv kzwj4Qjr9K7p4WvbhVk7rhNfuR6MbxrDwRx2EARCiRJCWNZTGGIkcnmTQMu5f/TnMk//P80lIINIr UEp1ECahA==; Received: from 213-225-15-246.nat.highway.a1.net ([213.225.15.246] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGJvp-0004M3-4E; Wed, 09 May 2018 07:54:37 +0000 From: Christoph Hellwig To: axboe@kernel.dk Cc: Bart.VanAssche@wdc.com, willy@infradead.org, linux-block@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 5/6] block: use GFP_NOIO instead of __GFP_DIRECT_RECLAIM Date: Wed, 9 May 2018 09:54:07 +0200 Message-Id: <20180509075408.16388-6-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509075408.16388-1-hch@lst.de> References: <20180509075408.16388-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP We just can't do I/O when doing block layer requests allocations, so use GFP_NOIO instead of the even more limited __GFP_DIRECT_RECLAIM. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Bart Van Assche --- block/blk-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index cc56e56c2eff..168e43d6398d 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1578,8 +1578,7 @@ static struct request *blk_old_get_request(struct request_queue *q, unsigned int op, blk_mq_req_flags_t flags) { struct request *rq; - gfp_t gfp_mask = flags & BLK_MQ_REQ_NOWAIT ? GFP_ATOMIC : - __GFP_DIRECT_RECLAIM; + gfp_t gfp_mask = flags & BLK_MQ_REQ_NOWAIT ? GFP_ATOMIC : GFP_NOIO; int ret = 0; WARN_ON_ONCE(q->mq_ops); @@ -2057,7 +2056,7 @@ static blk_qc_t blk_queue_bio(struct request_queue *q, struct bio *bio) * Returns with the queue unlocked. */ blk_queue_enter_live(q); - req = get_request(q, bio->bi_opf, bio, 0, __GFP_DIRECT_RECLAIM); + req = get_request(q, bio->bi_opf, bio, 0, GFP_NOIO); if (IS_ERR(req)) { blk_queue_exit(q); __wbt_done(q->rq_wb, wb_acct);