Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp712455ybl; Fri, 31 Jan 2020 06:44:10 -0800 (PST) X-Google-Smtp-Source: APXvYqz6wfGi/LIFnKnilgDHjyZFGqW+i3+auNcytJR0OEfDcf+YLBfwJbER5Xgew19CeyxyD6wc X-Received: by 2002:aca:4f8e:: with SMTP id d136mr6277209oib.61.1580481850045; Fri, 31 Jan 2020 06:44:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580481850; cv=none; d=google.com; s=arc-20160816; b=AgqfxvYj5PwUtWh4+Ru5HzHsnSeaK+kBaWkV90bfjYxYJ/RbLYPFPyFJVVniyo9JP6 nRIUVfqQ3Khm3zb7/tQkRru5UGSeutDmgCd+zU8aDnn1DiFbg9ntMEs+Oz1HCmKyuCLV 1g9LwrhpCRkSbTNcGj+Jh41hx2IyUa6zuKEVJv4nhREXtgFTt5bk8RfhhrK2Yqt3u3Kn df10SCGnCY5VktJld8z3wB7qY8DTB3U8hCZdGSy24EOllOJN3rMUwQZjuc2BZofYRdtY P5rcxcKjg996nxmimFcL/1fLWw6HFseYq+AYGOH9owphvdax57fkxmDHunbKxZghJ9iZ 2Suw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=U30xAUhq9GlK3veoTCP1Aa46ad7I+mdTGkPtxq4XRnk=; b=s4ZseJqgo9sgG0m1XPvxSFrEBW1lO1vyWXiVbcKyFdCVWBi2kbfWZ0MPZk7fiKIj6u hmnTLnwrkPDQmAERGDvel4EO1UzLzM8dnZm1jru0iN/KdQM1h0R+T2BkWOehixEh6RkT 9pMkdIEL6T4UxTCXEl4nNX9qIokpSn8WIr8Djj7yuLA+Ji2tiQInkkKsUoK2DKpNrkFg O+hSbEs289guccNTGRYGiv3sjyHLSAMRYhycWK8dvDYZXXKWXQFIrR/gBXNMFoO9HLLp 1MMgIkTNXcyjU4KPuzixJGVPUFXm866HfHByH+XRUeuGfO16yG3KJyScQGvNVTuQT4+R re5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=GGUgZrA4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12si4925210oth.233.2020.01.31.06.43.58; Fri, 31 Jan 2020 06:44:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=GGUgZrA4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729114AbgAaOmn (ORCPT + 99 others); Fri, 31 Jan 2020 09:42:43 -0500 Received: from mail-yw1-f66.google.com ([209.85.161.66]:39418 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728980AbgAaOmn (ORCPT ); Fri, 31 Jan 2020 09:42:43 -0500 Received: by mail-yw1-f66.google.com with SMTP id h126so4881065ywc.6 for ; Fri, 31 Jan 2020 06:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U30xAUhq9GlK3veoTCP1Aa46ad7I+mdTGkPtxq4XRnk=; b=GGUgZrA4CFAgGuGv42tlyLlpH9IVKcQwtU7RjJl1VclBDO6ElU65zqp/hIUpKJaIhD dFXD8WdLYIh42rN2FhkHIovIP/OWMEanVnYmJNNWIfiWDTeBa8AXbSDel1Wf4GhmvCE2 LcCD2WNF9vW2rhjUTO7xZpLuvoDZo2oVJkez/Mvsj3hmTb8DFPbfXcGzzCX1aHgYV30g GJ+lfYiKlckfJLKJSH5icsrzbscCy39iY5OMgWKCsHr98kHVdwnL6DtEPYmIXK50euox ABAjrK8hUjSrmt/d3fZ36F2vnLLtQi97JvThAppnSoJZI1Q6RxZljDCqpgoNTBTzjSkS FxUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U30xAUhq9GlK3veoTCP1Aa46ad7I+mdTGkPtxq4XRnk=; b=ROymyLZI0IerXIxxCBWeFBA5jX4fcBsgUK246DFhs4MPcJJGTtRhGcjoFGrTdAnJwb Vh2Kycljo3JqQ6MMwKmkCjaEDTi4qNZ69sGXWht/WKPeKShJqWtqjxnCw/d7Q5RePa4S Bhiq4GilebqteS2wl32TBFmmCVmioKnYLcaj/XBThJ9k5J6vAQeO5dk0kmNRowqHmBrb 3h2Hpu7NPZ4QsyK/jDLJLiE39bZR/8v9gaExmIYdvCIJUPjkKaP2Q9qst0TqzliDHbfd /pVKcMwY+M1Od8zalsyW+MUtCGZah2BE8Bxj1QiK7KBhouTXdtH9r4+nfnaF+MYv1PBK 2wlg== X-Gm-Message-State: APjAAAXhNj5cuEz3B1/X2jjORQOAD58/XLN+O1fD/SeI9fEBiIbOoseP pizFtHYSGyJkN5j1M4xGCEgQh/si3cuisGQimi1HKw== X-Received: by 2002:a81:7cd7:: with SMTP id x206mr7960111ywc.466.1580481760596; Fri, 31 Jan 2020 06:42:40 -0800 (PST) MIME-Version: 1.0 References: <20200130191049.190569-1-edumazet@google.com> In-Reply-To: From: Eric Dumazet Date: Fri, 31 Jan 2020 06:42:28 -0800 Message-ID: Subject: Re: [PATCH] dma-debug: dynamic allocation of hash table To: Robin Murphy Cc: Christoph Hellwig , Joerg Roedel , iommu@lists.linux-foundation.org, Eric Dumazet , Geert Uytterhoeven , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 31, 2020 at 4:30 AM Robin Murphy wrote: > > ...and when that represents ~5% of the total system RAM it is a *lot* > less reasonable than even 12KB. As I said, it's great to make a debug > option more efficient such that what it observes is more representative > of the non-debug behaviour, but it mustn't come at the cost of making > the entire option unworkable for other users. > Then I suggest you send a patch to reduce PREALLOC_DMA_DEBUG_ENTRIES because having 65536 preallocated entries consume 4 MB of memory. Actually this whole attempt to re-implement slab allocations in this file is suspect. Do not get me wrong, but if you really want to run linux on a 16MB host, I guess you need to add CONFIG_BASE_SMALL all over the places, not only in this kernel/dma/debug.c file.