From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.177 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796138730; b=fk4H/38Uxa5cO2un7uu2Vczn2iTuLNhdDprOSloF1T0IZwUfb6odGV+OPzYtqT/34OXI Q04uCsaVSM3pTwXejlLtUp+jZx6hxFmQkHoCRGzlYR+8q8ZMGY12PqAOa3SV211xjybEi 49qqqbEcFCXTHmSK6jyxqmWIoGKIeOgqxudzxbkCP9mAd8O+LJl4d12RV4nA32AJt2xHd 8HJP3ziCqfXff3bkiJ5/ILOncMSweqF4HFl+UvdxAseOnejyypfVljxW8RX8YIziQD9HC W1ffW/DNCTEL4m4ozIeBfgDjO7jGp+VgktfE8PE8zQD+luGtHgMMDs70nPYVy2VD2yA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796138730; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=5qOwTnbi3p5z+1W0QlFPO69v4Q8Gq+doCqi3hPHyhK4=; b=H2FWR1GicifXLcTKNMiwOpC7T05mJgcSZQDNX9YxbjHoWMxHzYrAbfgzmv4s2fSrbpyb rV118VyUrpCoUdTdvzdNK3FBbNRjRrpLrewyXyMnngwO2jPdXcTq5OMmW3VDrgb/Oz8g9 K1feLNEWSHxzH861hwtH0vqJPjpi2vQ9OIHeiKmTjPDIobeHnuQ1Q7bkmCNkzH4s7XOIz F9w9r48sc8/s53yOX5F4DcxwcM6e0mb8Hoawra8Ik7SqfzbmECUiWph7rUeH4Accuh1x/ SP1zDc7MuzNvFx9qamL0QvsRNx3+AfG+urA9iO14VaERAZOTKFZvARjTBKQTXJKMJ4w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=E+RjWg8M; arc=none smtp.remote-ip=209.85.222.177 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC3DB606A320 for ; Tue, 1 Dec 2026 15:25:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EC3DB606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca 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=E+RjWg8M Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-949657a20d7so1063685485a.1 for ; Tue, 01 Dec 2026 07:25:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1796138729; x=1796743529; darn=vger.kernel.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=E+RjWg8MZXBr5vSn5iqA13M1H20MJRyvRi/0N27ACDaXMQqmcnGu6A4zYsxG2cs9L0 ENO17z2yGr6L1i6TxIJGNGBJkSFeMCHfTLPqhKuPvoFdWL5yNeQRK49ZfGTVlHTdRtwC Q62MH+gMvZWYK4s0viAmqeU5Ubfr9UR2noWzEoVNV5iwn/7/ErvCBq2K1Fx/aodYOkMb Z0sPUg81i+qZ97+fQxzG41m6Ycug32v6mLyfvjL1L2bY4TFySIJlQys1xzLFJaJvmqtn VORwcpOFjZ9850weKxwnYcHqNQQtl7xZVq0bhYCictYbSk4HXpuH3y8x55p1Ipn6PCtD /t+A== 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=f4XUegU9LFvmDT+EaWBJhBR4uMmEOOu1Sr2S9g8cpsQeGJTY/1Ct0jbhZvifQyBl2b rpf2rXPMoTPRGFkeut4pJiIDST5El0j/jdlgIlq5ZG9y4Cw7JEOw1nm18+SU3MO0aVsF xL7ZaDB2ZNJnZqWJoPSuRfB9iDLc++EvG3TSHycZ1nUc0hbM77lcclSVsD6zAfPoFdIO LVB915WVkZ0+STa0+7CLQI4m+TpdXQL23OMcqG9RPvwn28L6IGwP85nhxOSBtqayL4dY WEMApz1FMTEdU37GWbGFqFlaKfh8f0R3Om8nJ+qSGninOCjdclXOeos4KHJhUh03im7P sQvg== X-Forwarded-Encrypted: i=1; AL+hErFiWp/uyrtnC2hHVd2N4uwAhvxeb7dz0HDjvI8QR/BGPs/L2dRO7bIp1MUrxPrBNEfAspyLJrQPYpkJSg==@vger.kernel.org X-Gm-Message-State: APuU4Z9FG+t7ZJKI0RzTdiWh+8CDEIcb4oWVIi+liJ4GKCWiqGlIA3iR 0Vq0go6FRS6y/TWP6EZI10CRZ05W47AAZiOep/zjZCy0DXfMd6yqkPECvfgq6PKFquY= X-Gm-Gg: AZFdTZf+Ub3JEfpux0jrkb3icCid+wtR6pjjUL7RCh3sq0u2Rv80VOqpcMA9wN2mKuk GKV1jxOjaEJe4bdQpTVtY5YuIhL7icAQrvVzjFSKRPshoagLOeg4qCRsyH0iNcpRHnkBiJMkWZc tx0zvEl6D5FMzTSTVXYiqrKm5SqnKjeFU3UB+SbHyqvJ9gqQLK/Z1fr74p3Vol+75bDR7DSa4bL GQ/QdkQNB4TOZ1EpFEM5gaGjAozBXOhkgNqr1ebHIyAMFyL2Sx9Pyy1dkWh8kDz62X6RdgSEe4o 8zXTRUHTPankZwwBh7mwOyBcGpFENPOgUiRJCYn4/UzV50dwzrv/r6b9N/+1hpp/p8dBqmIijco YnETlr9E/YMZIXk9pZrVOd4N4HubpVch1fJidl/fTIXDbjw/1ZpIxDj2B/mFdeC+PuL2NkxlcZ3 +Eqe7CepEZfWmsYXVvm+UAnw2Xfu2ZWTR5S1F07RYr0ahb9milfilcUhLnjt5cVN4XnVjI2k0B0 +fDFx7syJLxN3Z/NTFXJ4pvzlN1COXbAR52MPyngRerEbSqH2PzwhBvSK9kVxtCyv7Db+9zHRWA +97F 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-Mailing-List: linux-media@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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