Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp418497lqs; Tue, 5 Mar 2024 06:05:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXibzgzOxKVDw5Hmn0Dfuz3tAfRIo70v7+LD31oWj2Mj8o7XCHeR1aJNZoKfZEaUdeHXvH1Ks6ud1XtqL5IugYLxI3iJEp8s3VrOZ/EsQ== X-Google-Smtp-Source: AGHT+IGe1wiAUOgfVdQ0LpRcFnGBbwRSQRNqW9Z7W/C7b2H2HV1+htAB9UkjqubLOA2GFE8mNIxW X-Received: by 2002:a17:906:150f:b0:a45:33fb:35e0 with SMTP id b15-20020a170906150f00b00a4533fb35e0mr4619604ejd.73.1709647558775; Tue, 05 Mar 2024 06:05:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709647558; cv=pass; d=google.com; s=arc-20160816; b=ufz6jZGQy9zdaCebjbrz0rZTn9KVOuZZnEZJ8DJERdTogfLy8CF67XMg9no3DkUibT FuA7G6PKoptFJsNiXYJfXchBw6UNG7y4/ow06ltgiREVWgUqkaUzClr7uwd0I5aAfGID dVNsIyiAXKcd0Py2lA3qgQRNiE7z3zRHVZI1TPSbzXEJ9TOfeB7RnJELcbHdAmZPiW8x /H/yy/JqEWccBFsyWRvTI7BZs/ea80mGRDhaO3g0s/skGvOcD0NurJy8J8P3mtU8avXY tNjFlNxZAxxVM2iVmlueUEuHBvvqLB9UdaD07bMKq84hhqJCyc5Ljq1Sqb0oTuD/2lq2 8tsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=TFYO8jp/oH1Z8/boQKaDOaZY3YfJk2lt6Hs+f0eGGvE=; fh=LUTJq5lejUlm5H4cQ7Mju6dyEDib2InWFq7TLdVPR/I=; b=ggKa3vBSWZS/D3SP6G9nFcmOV0D3tJq/FXb4mPKJsJcX9hW7Q41VngXDkyWPIPtbdD gabcKHpjeCtu8q7Uo8+qpmyjvGzON0XFEuKL9XF2fnOhsiWkmnhtFFvxgls8sn6+aTHi pmUgRW+n569CQojtKbPkYYKJBRm+yNbfUaLCovhHfN9pCdug7DFrb3/eAfBMTtf30zg/ WgKpPskZQP81kAEESQfZoBku11j6/2422TqzdA3SpRpLMcyXEyF6UyZIKRGUwbcWxy5p RKFmvtZeqSTGhKBZEzrEpInmywHpYWa2F+vdlBxBGan7I5MVjWhErdltMGPX1xsVbssn kZHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-92485-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92485-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bw3-20020a170907928300b00a41a3052edbsi5341726ejc.963.2024.03.05.06.05.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 06:05:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92485-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-92485-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92485-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 813101F2154D for ; Tue, 5 Mar 2024 14:05:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9D0686141; Tue, 5 Mar 2024 14:05:51 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E300186136 for ; Tue, 5 Mar 2024 14:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709647551; cv=none; b=guFctYd3Yws2R9x69mLBKgGtBLtKy8qZm/1vIlJON+kTXE7AyCDdZgoE48wO0JOtwC9YFxHx8immsRYahPypOdc3vG3Mqx9svBRQVxKjyEqCNx/cAg8twftB7/Y3Db7ew0+JcbirmB1OUA820Gi60XZEtWF4G4BCTdUffq5kABg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709647551; c=relaxed/simple; bh=l6/9FLs3sfDp1nSrT9HHBWHSPnKmAZsIayGG9uKmBck=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mgBkIG1QwfYgF6bxqb4eDWWWZI/sen3eIvrNgRV8Q+v2K3pgAIZc0Qh/SgKAu7lBHCRu8xt38E1vn++V0mi/vCFyIIOJmSlK3EaoQDQFnFzmBGC09/mSgt8mndekT/ENLqjVfCiISJchRa7aWklhB9JCBm1ROsiLXogYrbeE6yY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 007F268C7B; Tue, 5 Mar 2024 15:05:43 +0100 (CET) Date: Tue, 5 Mar 2024 15:05:43 +0100 From: Christoph Hellwig To: Robin Murphy Cc: Petr =?utf-8?B?VGVzYcWZw61r?= , Michael Kelley , Christoph Hellwig , Will Deacon , "linux-kernel@vger.kernel.org" , Petr Tesarik , "kernel-team@android.com" , "iommu@lists.linux.dev" , Marek Szyprowski , Dexuan Cui , Nicolin Chen Subject: Re: [PATCH v5 6/6] swiotlb: Remove pointless stride adjustment for allocations >= PAGE_SIZE Message-ID: <20240305140543.GB3659@lst.de> References: <20240229133346.GA7177@lst.de> <20240229154756.GA10137@lst.de> <20240301163927.18358ee2@meshulam.tesarici.cz> <20240301180853.5ac20b27@meshulam.tesarici.cz> <8869c8b2-29c3-41e4-8f8a-5bcf9c0d22bb@arm.com> <20240301194212.3c64c9b2@meshulam.tesarici.cz> <20240304120055.56035c21@meshulam.tesarici.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Mon, Mar 04, 2024 at 01:37:56PM +0000, Robin Murphy wrote: > FWIW I'm also starting to wonder about getting rid of the alloc_size > argument and just have SWIOTLB round the end address up to alloc_align_mask > itself as part of all these calculations. Seems like it could potentially > end up a little simpler, maybe? Yes, that does sound simpler and most importantly harder to get wrong..