Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4175901pxt; Tue, 10 Aug 2021 22:56:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJOT9ILq9PGC9kHoDxXD0EWqtQM1cY9+BukZcOBIt/wxI+uGwz2NlLW8+5c0uxblaYA1tw X-Received: by 2002:a92:cacd:: with SMTP id m13mr77568ilq.256.1628661386555; Tue, 10 Aug 2021 22:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628661386; cv=none; d=google.com; s=arc-20160816; b=nfyusvZFokvhsPTjzyEbSkVh70LXjT3OCNetYf4HuhhOQI5tp10zs3q2/TLcitfNfB ha1osc4cZp9pat+otUUchpXAexfO1XpZoCMDcr6JZuj5QeWIPDhK0JYbRo28WX87VsY5 xwXyUFsu4LPWeOkzKP8GzbBNjOARbJQaaToFKUuRXS7V49NP1kVbuen2F4gyO8teOLcp /+fZp9ghs0ok7gAr55P24CsicB6Q9uz11IXJPumnebKzv0bKX4x/rE4jmfpr79le3oO6 /cheOLN5G/HSL3Mr+gGVHa2jb+a7YUVN8leJAvgKceroJusBo0FSfa4SYumqk26rsFwb scdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ximqsP9eH81bjVTaLK5J8CTiAXmX0UXkr88CH/kujB0=; b=pgiDbI4gVAjiXS3czezUA/dEs5bWUlkLCrWSnYgSP+9JaagDI9HMIHxhCwY5VNssNO tPC7wItqOLz2opEYs5L+31VfIgNg0mJPzwYbKona3Bt6mKNh6Eq/a5s3g14NUS3BuUF+ b/Swhn4btaPnOIQqSSW4d5g7cGJB6YPoFEuL7vkC0tM5S1Fdcci+xkcyDi6o1kfNSzvW VD1eGW1nSiLG8tOuH5A+37rFGz27y7egvM5c+/ubpRedh+ic7hTTkBhAC/t7qRzFQRK7 AelPeQSxD01jDWTHn5sqlCQOIV1Ompa2Ze20jTlH/Syt+5u38p3+wWgP04O+NEPEwnDH ranA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cqQCYTwO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p76si14998656iod.9.2021.08.10.22.56.14; Tue, 10 Aug 2021 22:56:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cqQCYTwO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234526AbhHKFyy (ORCPT + 99 others); Wed, 11 Aug 2021 01:54:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234370AbhHKFyg (ORCPT ); Wed, 11 Aug 2021 01:54:36 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18C32C0613D5 for ; Tue, 10 Aug 2021 22:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ximqsP9eH81bjVTaLK5J8CTiAXmX0UXkr88CH/kujB0=; b=cqQCYTwO/n7keDf+DqW61O3WA7 zquidGQy0kxeH+7gbrGWVqsa7V3686YeaBXzKuBAdl0fJoxWBxVuoRsb9QKKYiY+5VgPvDgyk0TGc lBAmlaWNvUXrFE5ahOzTMmz0/4HEIqdFhYOnYKylUxwF+UpWhX6c9G1wffuBtd9ANpeez5ToumXOG a11j6UgDrHIFNB9OMZD1kbBTGiBhnLqIZ4g+7KHW2ZpGrQd59c4Rwrv/isWwFomaTqGtw8FYdlSHj Rz629UwJJ/E2PrQNXA73arwYJKoZ6UyU+9wskQSPTTVYPbFdks/jZISMTGOLgI/WeNmwI7azg17na ZQzT/Z+w==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDhAf-00D27X-99; Wed, 11 Aug 2021 05:53:05 +0000 Date: Wed, 11 Aug 2021 06:52:57 +0100 From: Christoph Hellwig To: Tom Lendacky Cc: Baoquan He , Robin Murphy , Christoph Hellwig , brijesh.singh@amd.com, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, rppt@linux.ibm.com, linux-mm@kvack.org, iommu@lists.linux-foundation.org, rientjes@google.com Subject: Re: [PATCH RFC 0/2] dma-pool: allow user to disable atomic pool Message-ID: References: <20210624052010.5676-1-bhe@redhat.com> <20210624092930.GA802261@MiWiFi-R3L-srv> <8b3d4e02-6e94-ad59-a480-fed8e55c009a@arm.com> <20210805065410.GA2051@MiWiFi-R3L-srv> <5df93c4e-ffdd-88c5-db4a-1a09826d047a@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5df93c4e-ffdd-88c5-db4a-1a09826d047a@amd.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 10, 2021 at 03:52:25PM -0500, Tom Lendacky via iommu wrote: > I think the atomic pool is used by the NVMe driver. My understanding is > that driver will do a dma_alloc_coherent() from interrupt context, so it > needs to use GFP_ATOMIC. The pool was created because dma_alloc_coherent() > would perform a set_memory_decrypted() call, which can sleep. The pool > eliminates that issue (David can correct me if I got that wrong). Not just the NVMe driver. We have plenty of drivers doing that, just do a quick grep for dma_alloc_* dma_poll_alloc, dma_pool_zalloc with GFP_ATOMIC (and that won't even find multi-line strings).