Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5400848rwr; Tue, 9 May 2023 00:29:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ42jQUga+E7AY4mMWRuR2Z1PUQgje4nK9ey+aypZdEHJ79FvBZnPVDC6CxJIkkIzYDeIMq2 X-Received: by 2002:a17:902:cec2:b0:1ac:3be4:8a96 with SMTP id d2-20020a170902cec200b001ac3be48a96mr16489823plg.42.1683617358521; Tue, 09 May 2023 00:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683617358; cv=none; d=google.com; s=arc-20160816; b=uLooWZijl97e8KDhhHmJvoFQIF/tO2xb5SYvlvbOB9IzU7kFsF7IAcidm73rd2FPlH oxtQLF2SmgoMjRRuZedPuKLF8us7z6xHUBAlEWNSL0SftWk9uPpBpvDDG46lklOT41ix Dk0e83vmuBxziiMpFIBI0YDFvXjY6KgFOOMgXmPQ8k8Vf0vo1WVklMLGP3mnuv1+Xb+x 5sbEhzo/G19jAvuzc8X59qBnAKzQ9uSISqMni86HiPvIhqXuAOWFSP6a8gV4Kd8Ut05I ft2NxnqE/xpugggtybo5MXKHynChOT2huhYzj6oqqMDnUHLHVK8rpuZMYFBXZlmHKQKl YZuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=KBsRU7zPYgHu7ukzjCnMds/QebszOtpGhDdG3AxeaMQ=; b=HPKATtizvV5fGwKN+yuD81Ri80ptRG/jxSKTzEF2H4AiHUPqs78u3+YuIphOZfvjrf 7mLAl17ry/rVnP0Fg6/iWZwh5eMToU4t9Y5azHpziTS5WWyP0lu06TVQn8021jhm7Yve absUUfHpm8A9Xt5e43XJ3iHPT4jA+b+jUrEdS8PuqBkgsv2GoYs8dEirxlcEjUQGRH3G kwg3hK+Telvl8OgEGNnzx2jBQfjhMr3zHRw4RpdI3gs1gar7btlKc8znwXWcrJ1NWiBZ ru9cWzFYoGw5qi7kkVaPER/oJA+EOP9rkVxIN9AH3zFsYZPR3QaLsROKq5dfrgbN9Ndw EVHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tesarici.cz header.s=mail header.b=dV93bLA7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tesarici.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g21-20020a170902869500b001a63b045c86si940997plo.10.2023.05.09.00.29.04; Tue, 09 May 2023 00:29:18 -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; dkim=pass header.i=@tesarici.cz header.s=mail header.b=dV93bLA7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tesarici.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235063AbjEIHQp (ORCPT + 99 others); Tue, 9 May 2023 03:16:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232812AbjEIHQo (ORCPT ); Tue, 9 May 2023 03:16:44 -0400 Received: from bee.tesarici.cz (bee.tesarici.cz [77.93.223.253]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A628ED078; Tue, 9 May 2023 00:16:40 -0700 (PDT) Received: from meshulam.tesarici.cz (dynamic-2a00-1028-83b8-1e7a-4427-cc85-6706-c595.ipv6.o2.cz [IPv6:2a00:1028:83b8:1e7a:4427:cc85:6706:c595]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bee.tesarici.cz (Postfix) with ESMTPSA id BA506156323; Tue, 9 May 2023 09:16:36 +0200 (CEST) Authentication-Results: mail.tesarici.cz; dmarc=fail (p=none dis=none) header.from=tesarici.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tesarici.cz; s=mail; t=1683616597; bh=8evGPagrRUmEhFWx53rwyRMnzB1sop/iziZGU7noxh8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dV93bLA79agVk16Rcji7TLih39mWi4xLWCmkivJgCefXpLDgde71MaV5bIkOOteEB FT2jcsltXkODY1wl9A2JEyMdMLLVXIQEJShi3iSLYE2CbePzunz8DgkFVndj2Y9jZF hNuIP/e+xMENcJkYAPxpFH+Zjm2vfjOeCGBJlm6UKM3tRaGYavDhB2AvJUik58HcwV LiL6RALy9xipayRtxG/rCHjLx/TwbGBXT6HBhXP7VbkAq6JZ3kLcVzmR0XRpFdSK6a q4mPUim3Qd2JptB8foLwRCVAU9zsVaFtzL0iYOsnWOZN9Txg7djUm0BYtsIsv0sbag beJdD44cBiDeQ== Date: Tue, 9 May 2023 09:16:35 +0200 From: Petr =?UTF-8?B?VGVzYcWZw61r?= To: Greg Kroah-Hartman 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: <20230509091635.27450bd9@meshulam.tesarici.cz> In-Reply-To: <20230426144439.5674f8bc@meshulam.tesarici.cz> References: <20230426141520.0caf4386@meshulam.tesarici.cz> <2023042617-wobble-enlighten-9361@gregkh> <20230426144439.5674f8bc@meshulam.tesarici.cz> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, 26 Apr 2023 14:44:39 +0200 Petr Tesa=C5=99=C3=ADk wrote: > Hi Greg, >=20 > On Wed, 26 Apr 2023 14:26:36 +0200 > Greg Kroah-Hartman wrote: >=20 > > On Wed, Apr 26, 2023 at 02:15:20PM +0200, Petr Tesa=C5=99=C3=ADk wrote:= =20 > > > Hi, > > >=20 > > > On Wed, 19 Apr 2023 12:03:52 +0200 > > > Petr Tesarik wrote: > > > =20 > > > > From: Petr Tesarik > > > >=20 > > > > The goal of my work is to provide more flexibility in the sizing of > > > > SWIOTLB. > > > >=20 > > > > The software IO TLB was designed with these assumptions: > > > >=20 > > > > 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. > > > >=20 > > > > 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. > > > >=20 > > > > 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. =20 > > >=20 > > > 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. =20 > >=20 > > It's the merge window, we can't add new things that haven't been in > > linux-next already. =20 >=20 > This is understood. I'm not asking for immediate inclusion. >=20 > > Please resubmit it after -rc1 is out. =20 >=20 > If you can believe that rebasing to -rc1 will be enough, then I will > also try to believe I'm lucky. ;-) >=20 > The kind of feedback I really want to get is e.g. about the extra > per-device DMA-specific fields. If they cannot be added to struct > device, then I'd rather start discussing an interim solution, because > getting all existing DMA fields out of that struct will take a lot of > time... All right, 6.4-rc1 is out now. The patch series still applies cleanly. Any comments what must be changed (if anything) to get it in? Thanks, Petr T