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 DE56BC19F2D for ; Thu, 11 Aug 2022 08:42:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 749148E0001; Thu, 11 Aug 2022 04:42:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F8446B0074; Thu, 11 Aug 2022 04:42:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C0708E0001; Thu, 11 Aug 2022 04:42:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4D0976B0073 for ; Thu, 11 Aug 2022 04:42:23 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 256CEABE39 for ; Thu, 11 Aug 2022 08:42:23 +0000 (UTC) X-FDA: 79786670166.30.0D3F586 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf13.hostedemail.com (Postfix) with ESMTP id A09042019B for ; Thu, 11 Aug 2022 08:42:22 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4D90E5C43C; Thu, 11 Aug 2022 08:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1660207341; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BXWAGelHI6Qf6b5shKf8Bk4XHQmDrurWKAtmRuaA1lk=; b=CFz7NxCY7AZFWjv40Es5ZAs6bhLkTtcLM1wVqjiLOYeAYKaPu/Kq0dNPbDmRfxNMFbMsX2 kSSIu34EHghF+0je4TlVdzCABrL1AQp7BeFRq3MwYIjUFtYecaMbwYI9i/ibcSHhQOYsKu P8pkDizvAFUylntNXVQ2NJh1itONNi0= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2B57213A9B; Thu, 11 Aug 2022 08:42:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id zPNWCO3A9GJYWQAAMHmgww (envelope-from ); Thu, 11 Aug 2022 08:42:21 +0000 Date: Thu, 11 Aug 2022 10:42:20 +0200 From: Michal Hocko To: Christoph Hellwig Cc: Baoquan He , 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: References: <20220325164856.GA16800@lst.de> <20220811074946.GB14956@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220811074946.GB14956@lst.de> ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=CFz7NxCY; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf13.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660207342; a=rsa-sha256; cv=none; b=JwrpnB3wNn+Q8goBdP1m/x3KeBES0jnVmA1nI0DLcmVX0krYobb4VcmHK12uVQB+zxpVur o2yFmWO6//b1uAXBPyWCXVlGexLIJ+srAPfTWuW5VCUmiLvVR2jPWPuUz6eCHHr4cWccwN 2IDrFLAN13NTrgxHJuqI4EVNxlKk33E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660207342; 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:dkim-signature; bh=BXWAGelHI6Qf6b5shKf8Bk4XHQmDrurWKAtmRuaA1lk=; b=bBvGXRex6UczqpnKdu3ffYaGSHUWLLmqGwLRdUw6uGpcLwYNx000InBXhQsCioVdwk2wX4 iQ3BCIsUQMHc9LtibpixaOKd8nMcwE4yiX1eLRa9iLKctw4uD4HFJekCbf444nA8wotSdl 2ZxSXtAmEkVPsl22d5pYeKqO9A/Ht18= X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=CFz7NxCY; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf13.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Stat-Signature: ixmmrtf8x6q7ccye9ypn4aabscuumx15 X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: A09042019B X-HE-Tag: 1660207342-80681 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 11-08-22 09:49:46, Christoph Hellwig wrote: > 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). Completely agreed! > 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. Yes. -- Michal Hocko SUSE Labs