Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp277913rwb; Thu, 11 Aug 2022 01:01:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR7dHKWYuew5UNK0iUtS55TvD9QwkDYRUdnqTSKbrxT+mrvzwa12NI9jloP617c95+4DCpxG X-Received: by 2002:a17:907:1c8f:b0:6e8:f898:63bb with SMTP id nb15-20020a1709071c8f00b006e8f89863bbmr23946986ejc.721.1660204861860; Thu, 11 Aug 2022 01:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660204861; cv=none; d=google.com; s=arc-20160816; b=p7fPPxX+g92sKAfI7c/mKIK0O24lIxO23UX4QUEW5LKAxx4vLFFDJ4yrYMpAcwy8CR /Jr/Yb4JtV25RK4qoOEQyjrI8Z9GYkEAmLsXBXi1+PzrVI81MSbIiPwoSWD7N72ZBINa 8j+P9t2DYc4ObPQ+o46JPHTW7BeIUpoFM7h+3/cEbYLY1dgQ2Y+dFwKfRmcSwifrjeYX REId1BVLb51Sgr0OarmJnRYDRAieFiBNiAb9FmF381qwQ1f19Vhc4KByBGTLOfzKWfjT ENqaRB9YBAUn+st/tVLKpxxpBjqxVpvbJUyGMphMVnZRZIoD9IbtxJ+NLn0amrtnyeSO VWyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=HWllofgqWbzB5d8/F7a+GLZexv7cy3I/GzpdYiarcug=; b=lgnNW7eSstWqZjrGjuECPEIB41h7hGrqDtavuccGvFIrsOwBz20PYd15L9ZgCSNczA A9WioLZvAaJOVQXCIlEAoAxH73yp+U2Xr2hRf7+pmqOmyzmLrv7Qp9TKml1tJPtQjyVD NCUSnB5komPizmOpSRV0OGuYNjsGMh3oLsl+Qo77psHGDCP9YBve+tFwWEa6MkAuAzxm v95kqBJa9ZejZKdFWnrT74x6ifj9v0m+5JvlQ4GXzsgCoOyKwvYM9+OVRMD7w2Qq5AXh vbxkoe2/w8Ak3KRuo4NocGgfPKudMj/NpgT2xOuHWxCb6f6odrtEgbOCsQyW505278z9 bpWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b12-20020a170906490c00b0072f09e7093fsi5720734ejq.141.2022.08.11.01.00.36; Thu, 11 Aug 2022 01:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234296AbiHKHtw (ORCPT + 99 others); Thu, 11 Aug 2022 03:49:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234265AbiHKHtv (ORCPT ); Thu, 11 Aug 2022 03:49:51 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 039148E9B4 for ; Thu, 11 Aug 2022 00:49:50 -0700 (PDT) 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) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.