From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C516DC19F2D for ; Thu, 11 Aug 2022 07:49:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D5D58E0002; Thu, 11 Aug 2022 03:49:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 55E678E0001; Thu, 11 Aug 2022 03:49:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3FF4E8E0002; Thu, 11 Aug 2022 03:49:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2CAA48E0001 for ; Thu, 11 Aug 2022 03:49:50 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id F2C7B16014C for ; Thu, 11 Aug 2022 07:49:49 +0000 (UTC) X-FDA: 79786537698.06.E7CC30E Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf08.hostedemail.com (Postfix) with ESMTP id 44815160053 for ; Thu, 11 Aug 2022 07:49:49 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 4D1F968AA6; Thu, 11 Aug 2022 09:49:46 +0200 (CEST) Date: Thu, 11 Aug 2022 09:49:46 +0200 From: Christoph Hellwig To: Baoquan He Cc: Michal Hocko , Christoph Hellwig , Andrew Morton , John Donnelly , David Hildenbrand , linux-mm@kvack.org, LKML Subject: Re: [PATCH] dma/pool: do not complain if DMA pool is not allocated Message-ID: <20220811074946.GB14956@lst.de> References: <20220325122559.14251-1-mhocko@kernel.org> <20220325164856.GA16800@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660204189; a=rsa-sha256; cv=none; b=cYSYN4br6zpMmHwlXt7m1kJ1K6EqzlNv6UI3eY3maXKzk9BQ3yeO0mxM0kSJuF2ouirioj spprZvL77pi/jt3GekBDoYot7W65NeEYnuz8WdasppUGvJHoLpfiOltBOKWbxHiYbS+FTa QAPwgLiXLTm/50wIDfDWxuWKPFIVSJc= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=none; spf=none (imf08.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660204189; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HWllofgqWbzB5d8/F7a+GLZexv7cy3I/GzpdYiarcug=; b=C75t+Xu54kCBrRUaWYZV8Y8UNxdvGbltC97+90ajuADI+T9m3fj1oCNz9TljINFkDvV6fT 4KELHyibGSB5slJQKcsWCyhB7EZ1ATFp6xpBdX6nWSE7+vQtsRx+mUL+XlLe43y3yWjNYs PgQ5lh/ylPDXi2cUAKXA9/BzN/9YULs= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 44815160053 Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=none; spf=none (imf08.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de X-Stat-Signature: 51bj1z6nrxbu8g3iskajurrr6ksstk7i X-Rspam-User: X-HE-Tag: 1660204189-444354 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: On Thu, Aug 04, 2022 at 07:01:28PM +0800, Baoquan He wrote: > After attempts, I realize it's time to let one zone DMA or DMA32 cover > the whole low 4G memory on x86_64. That's the real fix. The tiny 16M DMA > on 64bit system is root cause. We can't for two reasons: - people still use ISA cards on x86, including the industrial PC104 version, and we still have drivers that rely on it - we still have PCI and PCIe devices with small than 26, 28, 30 and 31 bit addressing limitations We could try to get the 24-bit DMA entirely out of the zone allocator and only fill a genpool at bootmem time. But that requires fixing up all the direct users of page and slab allocations on it first (of which 90+% look bogus, with the s390 drivers being the obvious exception). Or we could make 'low' memory a special ZONE_MOVABLE and have an allocator that can search by physical address an replace ZONE_DMA and ZONE_DMA32 with that. Which sounds like a nice idea to me, but is pretty invasive.