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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04D47C7618E for ; Wed, 26 Apr 2023 12:26:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240630AbjDZM0m (ORCPT ); Wed, 26 Apr 2023 08:26:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240601AbjDZM0l (ORCPT ); Wed, 26 Apr 2023 08:26:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 631D01702; Wed, 26 Apr 2023 05:26:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 00F7162FD7; Wed, 26 Apr 2023 12:26:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70C57C433EF; Wed, 26 Apr 2023 12:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1682511999; bh=cdI2zaKgoeVH8+lh7QkDEcGOwMPtzMzzDqC1Ob1nKds=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qnOqm7ybgwu+DC68iZtWPjdOTym6MH7XxTN2/p31qzx99QWiUJFxjFpek/am/RsjL J78JpEkD/lO49If6n8utrPfZrNtelum+LW9DYynU1hPJC7QnHXYzPZdECqdd0aVD7D VlWhKvBu7PcmbTjDYaHQSB/lz1VE7E3fYaXez6xA= Date: Wed, 26 Apr 2023 14:26:36 +0200 From: Greg Kroah-Hartman To: Petr =?utf-8?B?VGVzYcWZw61r?= Cc: Petr Tesarik , Jonathan Corbet , "Rafael J. Wysocki" , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Borislav Petkov , "Paul E. McKenney" , Catalin Marinas , Will Deacon , Zhen Lei , Randy Dunlap , Damien Le Moal , Kim Phillips , "Steven Rostedt (Google)" , Muchun Song , Ondrej Zary , "Jason A. Donenfeld" , Petr Tesarik , Hans de Goede , Dan Williams , Andy Shevchenko , Kees Cook , Thomas Gleixner , Won Chung , "open list:DOCUMENTATION" , open list , "open list:DRM DRIVERS" , "open list:DMA MAPPING HELPERS" , Roberto Sassu , Kefeng Wang Subject: Re: [PATCH v2 0/7] Allow dynamic allocation of software IO TLB bounce buffers Message-ID: <2023042617-wobble-enlighten-9361@gregkh> References: <20230426141520.0caf4386@meshulam.tesarici.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230426141520.0caf4386@meshulam.tesarici.cz> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Wed, Apr 26, 2023 at 02:15:20PM +0200, Petr Tesařík wrote: > Hi, > > On Wed, 19 Apr 2023 12:03:52 +0200 > Petr Tesarik wrote: > > > From: Petr Tesarik > > > > The goal of my work is to provide more flexibility in the sizing of > > SWIOTLB. > > > > The software IO TLB was designed with these assumptions: > > > > 1. It would not be used much, especially on 64-bit systems. > > 2. A small fixed memory area (64 MiB by default) is sufficient to > > handle the few cases which require a bounce buffer. > > 3. 64 MiB is little enough that it has no impact on the rest of the > > system. > > > > First, if SEV is active, all DMA must be done through shared > > unencrypted pages, and SWIOTLB is used to make this happen without > > changing device drivers. The software IO TLB size is increased to > > 6% of total memory in sev_setup_arch(), but that is more of an > > approximation. The actual requirements may vary depending on the > > amount of I/O and which drivers are used. These factors may not be > > know at boot time, i.e. when SWIOTLB is allocated. > > > > Second, other colleagues have noticed that they can reliably get > > rid of occasional OOM kills on an Arm embedded device by reducing > > the SWIOTLB size. This can be achieved with a kernel parameter, but > > determining the right value puts additional burden on pre-release > > testing, which could be avoided if SWIOTLB is allocated small and > > grows only when necessary. > > Now that merging into 6.4 has begun, what about this patch series? I'm > eager to get some feedback (positive or negative) and respin the next > version. It's the merge window, we can't add new things that haven't been in linux-next already. Please resubmit it after -rc1 is out. thanks, greg k-h