Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5828428ybf; Thu, 5 Mar 2020 07:47:18 -0800 (PST) X-Google-Smtp-Source: ADFU+vuTFbwTbprwVktbNBInIHEidodrZUvgi9BSIIo5kMAEhpJlLzG5VfSG5PqrWlVurUXufpRI X-Received: by 2002:aca:c08b:: with SMTP id q133mr5815593oif.46.1583423238191; Thu, 05 Mar 2020 07:47:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583423238; cv=none; d=google.com; s=arc-20160816; b=R1sbLIGiapgdEKLdSVr83MpxzaIrW4FD1pLgBuEC1B+Nl2d/WxzZYkVqbcSKs5SsS4 P5pp+1FM/S5omcIZIqti7ENxDLjWnaTdf8OSIcm3lddtVw2q737F85VOU7QlTE97xq3s F8ShfRc67bn0F6joyZaoW9YBUMhVI2hguTua+YgYp8q4mixKOIEbKep4CoJkPJ6FfmWo OdKoaPjC1QNKI/wfVoFeZAHvxlA7z6CH2yjLQNqPJFsvNHDw5nO1l5p8NXO8k5WfeX8d isM5gWj0HEUSWbqd893QZpkWLNMRYcMmt18Uu1S8/EVblsPxRBiBPEstB9r9WVMhUW63 SpxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=u3skLRkNR37qvSvcMF0ZBsonVjcrDodoOqSFZsPCyIQ=; b=oxesCpGjgj6GL26oDFfYGSBTMYwDZ3JeNNsCqzvC0/f2/o4WM6oZ7elGj8INbGitVN g0l4s+kn0MAKceaoEZdmSWVQ1qMjJ0eZ9Qr3ykqnsUBV+dVPGKgQp8Qcw8SzDJAwbJuG NCb3Rq8I+fkH5qGE+QKU0+iXclMytQgTM+qqxiZa3BBJuYWdYXR8n6+7Iz6UBIVfqer4 p0YYAZs744wHTpsivp2NESv5/TlDaUoE6FcMwx2WFHI4kbPR+P1DBfdrg6jLUQavKT+z qh0F15qjnbASultJ5ynOT831vURYm5hbf758sF6ReTUaoFmzjNEAXJDy3Fsy/suSM4My n45w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22si3632892otf.63.2020.03.05.07.47.06; Thu, 05 Mar 2020 07:47:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbgCEPpW (ORCPT + 99 others); Thu, 5 Mar 2020 10:45:22 -0500 Received: from verein.lst.de ([213.95.11.211]:60036 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbgCEPpW (ORCPT ); Thu, 5 Mar 2020 10:45:22 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id A52E468B05; Thu, 5 Mar 2020 16:45:20 +0100 (CET) Date: Thu, 5 Mar 2020 16:45:20 +0100 From: Christoph Hellwig To: David Rientjes Cc: Christoph Hellwig , Tom Lendacky , "Singh, Brijesh" , "Grimm, Jon" , Joerg Roedel , baekhw@google.com, "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" Subject: Re: [rfc 6/6] dma-remap: double the default DMA coherent pool size Message-ID: <20200305154520.GD5332@lst.de> References: 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 01, 2020 at 04:05:27PM -0800, David Rientjes wrote: > When AMD memory encryption is enabled, some devices may used more than > 256KB/sec from the atomic pools. Double the default size to make the > original size and expansion more appropriate. > > This provides a slight optimization on initial expansion and is deemed > appropriate for all configs with CONFIG_DMA_REMAP enabled because of the > increased reliance on the atomic pools. > > Alternatively, this could be done only when CONFIG_AMD_MEM_ENCRYPT is > enabled. Can we just scale the initial size based on the system memory size?