From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89DC0606A320 for ; Tue, 1 Dec 2026 15:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=FbYnXzFp Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01C8A10F9FA; Tue, 1 Dec 2026 15:25:36 +0000 (UTC) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1117C10F9FA for ; Tue, 1 Dec 2026 15:25:30 +0000 (UTC) Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-94961d90b79so1182469485a.3 for ; Tue, 01 Dec 2026 07:25:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1796138729; x=1796743529; darn=lists.freedesktop.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=5qOwTnbi3p5z+1W0QlFPO69v4Q8Gq+doCqi3hPHyhK4=; b=FbYnXzFpt/8PAK69ILESrtm+xZgSwzigSyuBJocMgWoi0pbgroXHliBLYRsjNfCYy6 +pDI3qJKhlEwB/dl32HpFXZP0m4gMraVvmRIoRLplRL5rhQ1h9RVN6em/yhcm3HuqDjl CkAv3Qe9pRBzS/aoZaUjH0bKWP+jUOfg4yz1uSE+KR85YR4yjmjKv50AfYDZN18aGsx7 +QsQEvhecLVyckQT516kNvIZ41HyuyROnymUsz/Z0/thnXlzsK0DzOSFvVFPikagOlL0 d9/ECxgPNVQWsM/uz86+nhVqjeISh6vZIMc1CGzPlanY41fLjkLX5E/CgaNncDfR2FyG SJHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796138729; x=1796743529; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=5qOwTnbi3p5z+1W0QlFPO69v4Q8Gq+doCqi3hPHyhK4=; b=jVQPYQPNdDrqYFFZSvAKd0lTW4Q3l3Ncy2SLij70R7zc4eKE/OY50+JgVA9niJF3Gn qJc0eaGIbgo60rdASTQ6qIAkRDkiM4TZDrfYZeyWMyMogQ7sX45x5al0tRnvZE2GMk9q 53EfyfNo8yCaCGG5YdsVSbBtpNDq05FalQf24Qg45E6xRnDwo/Z97NZllXimJT6STFUj CsBrLqN3KanrHuym3gEDpKL0VA0VaOdCt5W4U/nx/6mh/MnT6TnyabeyAAnnim0wxbvF SF+TsVqjUDGNgFh91jvNXXccgSpBNM8RlnDJTyIZnA5fQwbKscJgIKos/TnjfLJUFxWX gYGQ== X-Forwarded-Encrypted: i=1; AL+hErE2E1z6hZeFd7F0bBs5wBQcdq4Ib4jHlZOJjZIC3oDR5Shr5mcxoiCZ5pVV0xAeHzQTopfvYOI+KQo=@lists.freedesktop.org X-Gm-Message-State: APuU4Z9aobPZ4dZA9RQGVYEIfbgri/9EKJEEBuz3S9ghf7bXCrTwzzX0 InJnwur7K3x4rbaZhz4PJR3msaUr30SZrqZP+p+swivH1r8LozBiBN8lWxu9Uep0/P0= X-Gm-Gg: AZFdTZfySiztsZveG4A73rFIIAhR4LLJdZMeEBjqBZyxKJPP1E99OZhjCwciA8WN9TW MDtiz9qvcaPC9FT4Ef3g/F/40Q/S1+MYUJ9SQNz77B7BGI+XyjSM0o6a8bfCw2swve8y1E7hPzE +y7QxQShnqGs9ab1ETu+gVt/QA07bBJ2bZesbuzVfnpbW/G2Zx87VL7c1HWpz28f29Wk7umOtOV ddaE//VWAgyw3OMGH1nmDZPskxW2G9G2OMYpEg1VxVV03cVPDoqL5M7CN/JBEt969SCOFYdlMut ImklgC20YeQGcvGW3P9VUNaNzAWZ0fXDcmEni7/pyS55fkKuafbTlZIUGpENEn0AKSmserXVNHC 5LWT6utkbY1fDzZDNXYuB9cJ2fIuFz3y3d1wH4zpaAoT/vFkucXnMpApfWtH/aaeL5lgJlYelGW lWIt9yN2YOStGiOhykxucINZCS4K4O4DDbdEd7ZYnQ34pjHewyUbFVW0KVpml82lkeQ8s28ob+d 9GUnU4pZKmONbjA5ZK5Imo5PaWxCoLG24rP8yYNOSMwHoAJSVFqThLmyIjQpdvmUFjc8P0v7UhE BZtj X-Received: by 2002:a05:620a:1312:b0:949:7acd:3c47 with SMTP id af79cd13be357-949ba69d1bbmr6634159385a.0.1796138728868; Tue, 01 Dec 2026 07:25:28 -0800 (PST) Received: from ziepe.ca ([142.177.118.84]) by smtp.gmail.com with ESMTPSA id af79cd13be357-949bb35005dsm2847982985a.11.2026.12.01.07.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 07:25:28 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xYPjT-000000012kI-2U8T; Tue, 01 Dec 2026 11:25:27 -0400 Date: Tue, 1 Dec 2026 11:25:27 -0400 From: Jason Gunthorpe To: "Aneesh Kumar K.V" Cc: Catalin Marinas , linux-coco@lists.linux.dev, Andrew Morton , Baoquan He , Mike Rapoport , Pasha Tatashin , Pratyush Yadav , Christian K?nig , Joerg Roedel , Marc Zyngier , Marek Szyprowski , Robin Murphy , Steven Price , Sumit Semwal , Suzuki K Poulose , Thomas Gleixner , Will Deacon , Russell King , Benjamin Gaignard , Brian Starkey , John Stultz , Mark Rutland , Radu Rendec , "T.J. Mercier" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Ritesh Harjani , Shrikanth Hegde , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Kiryl Shutsemau , Rick Edgecombe , "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Paolo Bonzini , Vitaly Kuznetsov , Andy Lutomirski , Peter Zijlstra , dri-devel@lists.freedesktop.org, iommu@lists.linux.dev, linaro-mm-sig@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mm@kvack.org, kvmarm@lists.linux.dev, patches@lists.linux.dev Subject: Re: [PATCH v10 04/13] irqchip/gic-v3-its: Allocate shared tables using CoCo shared memory allocator Message-ID: <20261201152527.GI1856591@ziepe.ca> References: <20261116091137.94252-1-aneesh.kumar@kernel.org> <20261116091137.94252-5-aneesh.kumar@kernel.org> <20261124134621.GI9566@ziepe.ca> <20261201132156.GC1856591@ziepe.ca> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, Dec 01, 2026 at 08:08:21PM +0530, Aneesh Kumar K.V wrote: > Yes, the allocation size is a power-of-two multiple of the sharing > granule, since the sharing granule is itself a power-of-two multiple of > PAGE_SIZE. However, is that the clearest way to document it? The code > does: > > cc_shared_round_size(len, &size); > order = get_order(size); > page = alloc_pages(gfp, order); > > Would it be clearer to describe the returned alignment in terms of > PAGE_SIZE and the resulting order? The API is "The alocation is aligned to the request size". You can mention it is over allocated to fit the platform's shared/private granule so is very ineffecitient for small allocations. > The ITS code already sizes its requests assuming that the allocator > returns memory aligned to the allocation size. Since the new allocator > preserves that guarantee, I thought those requests would continue to > meet the ITS alignment requirements. Sounds great Jason