Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35987693rwd; Mon, 10 Jul 2023 16:08:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlGOr+G5zrpeLtcM3MJF7hGLHwe1FeaGGck3pKl+w8ErhwUIhjbVguHwlJsG1hY8Okaa5Kdr X-Received: by 2002:a05:6a20:549a:b0:12f:bb22:ad30 with SMTP id i26-20020a056a20549a00b0012fbb22ad30mr13261726pzk.41.1689030516906; Mon, 10 Jul 2023 16:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689030516; cv=none; d=google.com; s=arc-20160816; b=rVDkFu6CPpgpfOUdOwmj1dH3NLZXPKbTVeTBVrYDeUAIlogQ1lNicwvLPC2dw2+gBj orggoBxIJn1PsQaNdyM8HxnjLGxEtXrMNHTSbp1qfgC4Ehb8sECmURWZV/2Dtbb/aYi8 B/FrP3Gyg5gxJYFIP35PfqkbdzKUn5j8+fil9fz6K9FtweVWO7uttwvXxEo5pt8JrYGz bAZwVyikXnFKHG4NfGUmYV23SV4Sxi/jBOlUiz38PU69d8TXfCv4CCVwfOD9emOJ+PKE PoPdoXB4hKz6780xQIRtFvYulNHCFWkkWPjKcMbxFBw8pl9nYKBKgM+A6iU4gFHPNtwU KpCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=k+uRSZaNW94drRfaP5L/VJThT+qbzWt+a4m0PC1+H4c=; fh=8dStUZTZOvz11D7GLRDbIbmq2cyTEOfD2WFY/nj8GME=; b=s/B9kD/C//r59QJtCWEtRRw96l+CtfBxqHELpw31SqEH54irVrYReBse/bDIaoT6wG fy44VmZLhLCg7/eUJs9aKQ2aI6C+e0S2rt6JR4G0P1mjCE+0lch+X5otJqY23MUKGmZn Y3SoqEMhPdyyxKZ5vTEiyfvK9HYE85m9ojIFr5l4MjEOKFXEdOiJlYVozULhfO53OcOJ FWgQ0YeOyyiImperRZD2OreVaFIEmPfcMvEDTjBeT7lfK3hGLu54N3DVQCCsFma09ojn izAkbZwBCYEeTGEnz1BDjebFHTVC8fYQl3m1DJppM+3t3+tE0VMyCppcE58UxsFERJf8 2kmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fireburn-co-uk.20221208.gappssmtp.com header.s=20221208 header.b="BGJwtu/e"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fc8-20020a056a002e0800b00670db3b5032si430027pfb.333.2023.07.10.16.08.24; Mon, 10 Jul 2023 16:08:36 -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=@fireburn-co-uk.20221208.gappssmtp.com header.s=20221208 header.b="BGJwtu/e"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbjGJWYL (ORCPT + 99 others); Mon, 10 Jul 2023 18:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230049AbjGJWYB (ORCPT ); Mon, 10 Jul 2023 18:24:01 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FC5B1BC for ; Mon, 10 Jul 2023 15:23:58 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-307d58b3efbso4964043f8f.0 for ; Mon, 10 Jul 2023 15:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fireburn-co-uk.20221208.gappssmtp.com; s=20221208; t=1689027837; x=1691619837; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=k+uRSZaNW94drRfaP5L/VJThT+qbzWt+a4m0PC1+H4c=; b=BGJwtu/eYDeeRz6gd9DW/1dlrKmdKTY5LkPMrD8VqiQjMxN7JoO9VdAeSxsct2N1AA RHztHsO/Ag4ji7+SPc/aVGU+ioISxQDSctgi4qfPKB/qChuM1/SUco0pTqNmKQbWdbyo 7fDfQpW7AE7IIJpAdBuwj+QuXBAiNXIjBDr73NztsSaHYezINnldgNhJBcd0qYW5vmEY +4G/hVixr3YySmX+NrwspZKpNocBFDbfCCAZadUYle20SqmBqPXX91t6M23ZcsnE/P09 wEEBJYThW/kn39pNb0v7acrw5izKLcx3fgmiSgQ3Y9cAMSokLMrSpnv6a5acp4nvaACs GFww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689027837; x=1691619837; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k+uRSZaNW94drRfaP5L/VJThT+qbzWt+a4m0PC1+H4c=; b=M7OawgJDMQF7n0/48U5w6fJAjs+je7vqXGmcQsu444B+R5QBNuVNu5UDUuSbt7tx0s w0hpjOlBVl+rwF8WExcOQF+ahd1Unr2hXXp7VLkvIeeeKoc/KX9yBa5n5jLXfzXyFNtU j19PTC19Cc+RSwqGAJlWQ+naXyyccUSF1ZE0SPUMDA8B0cCnPvWtKjlzbxsJbdgKW27c ZWkc5WHk8xADrjpcZHR/RAzZ5xs4quu8CD7UP/PViEDHKgwi8s9/FaTNGgpl/ufAnbNc 0egjUNAPcjAL4EhPZOYD8wHZ/QwNoNy9tVmKwWPvAa95kD2Qb1/AZLKuIGV5O/nSS9vA HIzA== X-Gm-Message-State: ABy/qLaETWH/O0nATKycsMs5xgVUl67SL6xJPr55E164HD+YLyOdry0P GWuRDPQqh7mymZs3AigkKKZ+jzfrNyBsS0KDWRYm3A== X-Received: by 2002:a5d:614b:0:b0:314:7487:96a3 with SMTP id y11-20020a5d614b000000b00314748796a3mr10923400wrt.52.1689027836873; Mon, 10 Jul 2023 15:23:56 -0700 (PDT) MIME-Version: 1.0 References: <20230426141520.0caf4386@meshulam.tesarici.cz> <2023042617-wobble-enlighten-9361@gregkh> <20230426144439.5674f8bc@meshulam.tesarici.cz> <20230509091635.27450bd9@meshulam.tesarici.cz> <2023050949-grueling-verify-a43b@gregkh> In-Reply-To: <2023050949-grueling-verify-a43b@gregkh> From: Mike Lothian Date: Mon, 10 Jul 2023 23:23:45 +0100 Message-ID: Subject: Re: [PATCH v2 0/7] Allow dynamic allocation of software IO TLB bounce buffers To: Greg Kroah-Hartman Cc: =?UTF-8?B?UGV0ciBUZXNhxZnDrWs=?= , "Jason A. Donenfeld" , Muchun Song , "Rafael J. Wysocki" , Catalin Marinas , Kefeng Wang , "open list:DRM DRIVERS" , Kim Phillips , Christoph Hellwig , Marek Szyprowski , Jonathan Corbet , Will Deacon , Damien Le Moal , "open list:DOCUMENTATION" , "open list:DMA MAPPING HELPERS" , Borislav Petkov , Won Chung , Thomas Zimmermann , "Paul E. McKenney" , Hans de Goede , "Steven Rostedt (Google)" , Zhen Lei , Dan Williams , Andy Shevchenko , Petr Tesarik , Kees Cook , Ondrej Zary , Petr Tesarik , Randy Dunlap , Roberto Sassu , open list , Thomas Gleixner , Robin Murphy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Hi I was hoping this might land for 6.5-rc1, is there a new version that might apply against 6.5? Cheers Mike On Tue, 9 May 2023 at 08:32, Greg Kroah-Hartman wrote: > > On Tue, May 09, 2023 at 09:16:35AM +0200, Petr Tesa=C5=99=C3=ADk wrote: > > On Wed, 26 Apr 2023 14:44:39 +0200 > > Petr Tesa=C5=99=C3=ADk wrote: > > > > > Hi Greg, > > > > > > On Wed, 26 Apr 2023 14:26:36 +0200 > > > Greg Kroah-Hartman wrote: > > > > > > > On Wed, Apr 26, 2023 at 02:15:20PM +0200, Petr Tesa=C5=99=C3=ADk wr= ote: > > > > > 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 sizin= g 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 with= out > > > > > > 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 th= e > > > > > > 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 ge= t > > > > > > rid of occasional OOM kills on an Arm embedded device by reduci= ng > > > > > > the SWIOTLB size. This can be achieved with a kernel parameter,= but > > > > > > determining the right value puts additional burden on pre-relea= se > > > > > > testing, which could be avoided if SWIOTLB is allocated small a= nd > > > > > > 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. > > > > > > This is understood. I'm not asking for immediate inclusion. > > > > > > > Please resubmit it after -rc1 is out. > > > > > > If you can believe that rebasing to -rc1 will be enough, then I will > > > also try to believe I'm lucky. ;-) > > > > > > 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? > > Try resending it, it's long out of my review queue... > > thanks, > > greg k-h