Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp597874ybz; Wed, 15 Apr 2020 14:51:24 -0700 (PDT) X-Google-Smtp-Source: APiQypI+OrSdtJA8PoPyeFFVm7v8MSyhkzBYJSLPvjWTI9WJBRuPtHDqYCfLDDOJkjASTFCfXUzc X-Received: by 2002:a05:6402:c82:: with SMTP id cm2mr27053192edb.358.1586987484273; Wed, 15 Apr 2020 14:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586987484; cv=none; d=google.com; s=arc-20160816; b=gDNDD/s2l0tGuQA1e/ANIULxGSNpGVlNqcXK77XSrg4ZtDHcHxZhFqwK440F5IIfQb eGI+yjyonElrdYoRmghqy/pCcVZlW3yzOTLh+D50jK+mvff+jWh4+AAL+zvws/YrXXRi Ub61pmFpSSX1+IO95HkFWh/k7jagyFNiQo8Q56ZU0IYdOMwrYRW7Qe1vETy5wwF6u3Aa 68PTzbJRjSeuij8dyqO9Ly14wSnWSa3kqrfRKfa28WegybNvWZP6OS17Djtr+E9ql0jk GE5pediSELB5RXCxMjB0IghCO/n3feXW979Vgbze1MEaEoAZAy6eCVHE2vAsv8sY65OX VJWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=uh/180abQgmQ6BQ7TjempJNClKOaOSf5CJ7rtROtEkE=; b=LPvP7R9aBWQeuqp7HShPp2RSS9p6YKvDneUvkMMOrKkfptbKyugqpuDEjFOsRWVkdh 1kN9zDu6ErIKycbI+rwce8pN2Iyzf46XB6vhOHf1Abm14zzFTSMOYAaLc+8uhHoVpVpd FJLjXBPqeeMLGDe20Y6glvpFFqeXVkekjVU6VXW4CfQWR2kxyOEia8OhtQUsBeRrJgq4 O0BUiKyMIha9CxbnOm1S+6EQYARWZbvlt9KhRb+B/VLmT0oZiCsYD5nOd2o7PRQg96Y3 6yisxoxkhmpwEbA5c57vlSujioqg1e/7p0yPJ4ltnARFKySqC0AC8K7ITyghhGnXSZWg QRjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cBSDD4vr; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si11552797ejk.282.2020.04.15.14.51.01; Wed, 15 Apr 2020 14:51:24 -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=@google.com header.s=20161025 header.b=cBSDD4vr; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504821AbgDNTbT (ORCPT + 99 others); Tue, 14 Apr 2020 15:31:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2504778AbgDNT3u (ORCPT ); Tue, 14 Apr 2020 15:29:50 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37CD0C025481 for ; Tue, 14 Apr 2020 12:23:32 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id u65so389763pfb.4 for ; Tue, 14 Apr 2020 12:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=uh/180abQgmQ6BQ7TjempJNClKOaOSf5CJ7rtROtEkE=; b=cBSDD4vrRu2upc6r3gqJwDFaQSWjr+17rSaxPc9/xT79CnR00LWsE6Ow6sJurp1BA5 po/AGG98n8lFdQkAWQi+CDtNlbASVECECHMr16HNxN9EVzyN5lct4/KaV7JhTeAhmfNT CKC8vf8rOhffLDtmFRV+XGP/WKpHS7KYBhA2LK/IE5BCOMeA2Ghn6uO2g403g5XEb8Td Uve+jkNURH8epjGee6h9MMB6pIfcQF3E87ZvJhDA4xKu1VYlkBUjJCrZpS2hmnejTScy 1uswIyb9bK+TkRw9Y86yKCQWXYLICDOT4HYWtWHkkmGoZls7DTUZxI1i4bRJFzx8C59w fcOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=uh/180abQgmQ6BQ7TjempJNClKOaOSf5CJ7rtROtEkE=; b=mnXRgZNkQf9hi0QS6XIxMSY5UB3Sk+a7st/b7w/pv7CzOi5qJNOubmvJYAysOXbufy PxOdE8igtI6QoY6wImK4TYQiRSdu3Tt4O3PVjMU15hZe0oQ2y4BKWIYQfVTrcLwMaL9A m3oxrlFezKbBX7Dp7r1ZPIo7Bqi7bW3ijl9qUy7/6Gmp36cPiemZ172NWJ6YoPiZAgJ6 B4h5o4Prl7ucbE+A3z6xfAJrwS+tCjOk9lwxJZxFydqJVgM7fLaSs7c7D9qmBEwnJxFh JJVxiSg6V00nebx0FUsuxsCJTiYMPIKExDXKfULitqxduC/Ua2xt41lq8J+j8biM/8lK TXjw== X-Gm-Message-State: AGi0PuYHnYJc4xlxBYINqQ3p+r4k6+Lo5XL/gc4ci0/9N+rIT9Z4HzyM HJ3w2DPsyUBGDZJusVaaVNfsmw== X-Received: by 2002:a63:ca41:: with SMTP id o1mr24177997pgi.419.1586892210952; Tue, 14 Apr 2020 12:23:30 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id 3sm1147978pgh.75.2020.04.14.12.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 12:23:30 -0700 (PDT) Date: Tue, 14 Apr 2020 12:23:29 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Christoph Hellwig cc: Hillf Danton , Tom Lendacky , "Singh, Brijesh" , "Grimm, Jon" , Joerg Roedel , linux , iommu Subject: Re: [rfc v2 3/6] dma-pool: dynamically expanding atomic pools In-Reply-To: <20200414064441.GC23359@lst.de> Message-ID: References: <20200410145520.17864-1-hdanton@sina.com> <20200414064441.GC23359@lst.de> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Apr 2020, Christoph Hellwig wrote: > > I'll rely on Christoph to determine whether it makes sense to add some > > periodic scavening of the atomic pools, whether that's needed for this to > > be merged, or wheter we should enforce some maximum pool size. > > I don't really see the point. In fact the only part of the series > I feel uneasy about is the growing of the pools, because it already > adds a fair amount of complexity that we might not need for simple > things, but shrinking really doesn't make any sense. So I'm tempted > to not ever support shrinking, and even make growing optional code under > a new config variable. We'll also need a way to query the current size > through e.g. a debugfs file. > New debugfs file sounds good, I'll add it. If we want to disable dynamic expansion when the pool is depleted under a new config option, let me know.