Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4215123rdh; Tue, 28 Nov 2023 15:33:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwglExDQqCwqjBBPh1Nf/S2fLhNQJQ0Od0HWS4okPQ8ngML7QNYmxtDiEeDevolNgfiLD/ X-Received: by 2002:a17:902:aa02:b0:1cf:fe32:634a with SMTP id be2-20020a170902aa0200b001cffe32634amr3129750plb.43.1701214389200; Tue, 28 Nov 2023 15:33:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701214389; cv=none; d=google.com; s=arc-20160816; b=mxigDKKSpM9EYD6feZYZdul100yXH3NbVXrwTRPjVJE14qAU1YnFGPokrLSX3zMGls if0ysHgY9+QqfnOKLGDQqZfl/JcLtoxl8nfqQq6Igk3em28d/PQC1G72WhSLVwRPLH6z fXWIq0+avOitDPCTBLbB0cI6f+CdrSwtp0PSl6pOGwBl2DIFPdiIQUSKJbb87xK2BGNI 0cV3dUAKwNmxrB/oC4t/13r9tOnvaaWJvBe62C+RAaamKQC9Nzcyofs0q5QEv0ZOtl/4 BGZ3QSGXljdlIJTj3PiCrd0w4QXUV5Slqy9ok5VZc7rG7VRkJMChM014XZjZOg4jtKw8 sFqA== 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=T5E8YxJ+6DFizX8w/tjdr1Q20AjeSOztly1v+T84HO0=; fh=KrOdxIG8yo4eQUue+6iUQpXhhA25gH2Ad8XZy9Mnro0=; b=wDJ7u/j2Vwqr/vsEbxMS27G73SDMmJUFtxUo9eMpavuZ95LFRw9T6BinqXQo5jw32s DURtLpF16YmQ0UAB4er0guuhfxuIdnPE7H33p2x0J+2AxaHdWz3hEzWv70mdQ0wmtinR Ih9zATwpYHDbh/VpAuolyHwKAfNTm9lTtb0UqSQZneWnPppVFUowjrHDf6Gd+uE7AoAQ dYonQoBNayFN6el8HOOxv30Dt2jSLxsl+taZZKQ4LVapu2RrTBxJrrhiyma4xBkzWs8R F7zsH/h91mJoqGL/0jJOTKITzH4EdABoMNCvyr74YbQSDhyJCq8mvBJeOWCr3vXggZid mfug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=hAjmDOgU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id i11-20020a17090332cb00b001cfc9894958si6703765plr.379.2023.11.28.15.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 15:33:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=hAjmDOgU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9DA7083348B8; Tue, 28 Nov 2023 15:33:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229970AbjK1Xcx (ORCPT + 99 others); Tue, 28 Nov 2023 18:32:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbjK1Xcw (ORCPT ); Tue, 28 Nov 2023 18:32:52 -0500 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A8C19B9 for ; Tue, 28 Nov 2023 15:32:58 -0800 (PST) Received: by mail-qt1-x831.google.com with SMTP id d75a77b69052e-4239f5c1ec2so23482161cf.0 for ; Tue, 28 Nov 2023 15:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1701214377; x=1701819177; darn=vger.kernel.org; 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=T5E8YxJ+6DFizX8w/tjdr1Q20AjeSOztly1v+T84HO0=; b=hAjmDOgURwcCKRyzsQ2r9G/hrW5XB5oPAgH+truRdM7Ubd9bwhx+SUNOk769wz6aTr VYfsuUmPAUDpDhIramOnNZVkmzbTcE1UjeRmD5rqVTIW9Q/tz+C/MvLNj9eOiZz8qsGp +W6GO2qUsEaJy2fEIylTKL+Xx1ZDQQkwQ0zT405NTPg3borX7TjETTNniEkz183RclQt 60Kvw5avLZcFCPd2vHJhiHAi7jNEPvFiNyGXUg6AxM1NyQ95U51usNeoyOM0Xz4qTxwS 9F58JT1vDhwM60ZIjXHSSHHZeWT5IrJ4U3G7m2fIhWwODX7PcRzchcRkIZ7xRhpL3pFh TUNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701214377; x=1701819177; 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=T5E8YxJ+6DFizX8w/tjdr1Q20AjeSOztly1v+T84HO0=; b=sTAFez2uwp/7mVqXOqv/6LS89nWXxbaPfsFdfJso5rAjdpG+E8O6a4FZv6snrPzeju I8OB09zGRtMtdxAKfBVs55T87rT89WW8U8luUJ7C1tc9tcLJOAbMF7+J8EeZroTofA8/ 2W7N1HGLnGvwHOUQEKZ9LY5FFD9gkC6LUoWFBuSez1IUqeUxk65pCQd9O2qcC6xgT/d3 VAbsFMHCQSo0hqo1xiox9tg1UwVEsLfREFojdNjvXR6bK4jQd2+rB6Tu9hXoyPD2rhYM kJlsoJ00bEZKz9WiazSM+robn+wqyYam1BJnEXrJ4e0LNWGDTwRDkSopACDOYmm1rNXO BRwA== X-Gm-Message-State: AOJu0Yy9E8tkBkXVrNq1QICN9MauMdNW0Kgimhb0jNCSRoJoijKgQ/L+ yg5TLnbE9uzdmPkvQ9ZEWDHY4oSLnRhliDSJKlzKXw== X-Received: by 2002:ac8:5c06:0:b0:419:a2c6:820e with SMTP id i6-20020ac85c06000000b00419a2c6820emr19578443qti.12.1701214377257; Tue, 28 Nov 2023 15:32:57 -0800 (PST) MIME-Version: 1.0 References: <20231128204938.1453583-1-pasha.tatashin@soleen.com> <20231128204938.1453583-6-pasha.tatashin@soleen.com> <8e1961c9-0359-4450-82d8-2b2fcb2c5557@arm.com> <6f9ff0aa-7713-4de1-869e-4725828942e4@arm.com> In-Reply-To: <6f9ff0aa-7713-4de1-869e-4725828942e4@arm.com> From: Pasha Tatashin Date: Tue, 28 Nov 2023 18:32:20 -0500 Message-ID: Subject: Re: [PATCH 05/16] iommu/io-pgtable-arm-v7s: use page allocation function provided by iommu-pages.h To: Robin Murphy Cc: akpm@linux-foundation.org, alex.williamson@redhat.com, alim.akhtar@samsung.com, alyssa@rosenzweig.io, asahi@lists.linux.dev, baolu.lu@linux.intel.com, bhelgaas@google.com, cgroups@vger.kernel.org, corbet@lwn.net, david@redhat.com, dwmw2@infradead.org, hannes@cmpxchg.org, heiko@sntech.de, iommu@lists.linux.dev, jasowang@redhat.com, jernej.skrabec@gmail.com, jgg@ziepe.ca, jonathanh@nvidia.com, joro@8bytes.org, kevin.tian@intel.com, krzysztof.kozlowski@linaro.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, lizefan.x@bytedance.com, marcan@marcan.st, mhiramat@kernel.org, mst@redhat.com, m.szyprowski@samsung.com, netdev@vger.kernel.org, paulmck@kernel.org, rdunlap@infradead.org, samuel@sholland.org, suravee.suthikulpanit@amd.com, sven@svenpeter.dev, thierry.reding@gmail.com, tj@kernel.org, tomas.mudrunka@gmail.com, vdumpa@nvidia.com, virtualization@lists.linux.dev, wens@csie.org, will@kernel.org, yu-cheng.yu@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 28 Nov 2023 15:33:06 -0800 (PST) On Tue, Nov 28, 2023 at 6:08=E2=80=AFPM Robin Murphy = wrote: > > On 2023-11-28 10:55 pm, Pasha Tatashin wrote: > >>> kmem_cache_free(data->l2_tables, table); > > > > We only account page allocations, not subpages, however, this is > > something I was surprised about this particular architecture of why do > > we allocate l2 using kmem ? Are the second level tables on arm v7s > > really sub-page in size? > > Yes, L2 tables are 1KB, so the kmem_cache could still quite easily end > up consuming significantly more memory than the L1 table, which is > usually 16KB (but could potentially be smaller depending on the config, > or up to 64KB with the Mediatek hacks). I am OK removing support for this architecture, or keeping only info for L1, I do not think there is a reason to worry about sub-page accounting only for v7s. Pasha > > Thanks, > Robin.