From mboxrd@z Thu Jan 1 00:00:00 1970 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 0C5ADE552; Thu, 24 Apr 2025 08:11:13 +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=1745482276; cv=none; b=CAVJN0JWMmcGyI0sz53vADj2uYM5ZMHYWaxFthQ+z1vXNMgLbturC+qNLOUdkRm2RAy8UcAFcxYjhHk3a0kD3tAB0QzNSXfbcWmirpqFPXtdtVZM4OQGWxLanuKZrECOc/TXkWVbMsrmQR+wk9m+1JNvKpxHkqN0xPTnz/NenFQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745482276; c=relaxed/simple; bh=JGL3psGtkPH2/js8ND1zwM6GdWFnAznTJQ556NVu1Dw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rHO4u/Y/lGtHRuH0Uk2/BW6hQZ6oL9oPpn8lmUi3ivcOLa0NoaU8eFySORTnhjI+Q6UL3pfWMUC4Zl8MmW3qVCyBZABRVYTC4vpdutK9tbqj5BfDd2GtKaqvHVJ+wCRbrzrC8QtwY0nLsjhMAGvgaVoEtfYhF/z8+VpalxsjW9I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (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=pass (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 2F45667373; Thu, 24 Apr 2025 10:11:01 +0200 (CEST) Date: Thu, 24 Apr 2025 10:11:01 +0200 From: Christoph Hellwig To: Leon Romanovsky Cc: Jason Gunthorpe , Mika =?iso-8859-1?Q?Penttil=E4?= , Marek Szyprowski , Jens Axboe , Christoph Hellwig , Keith Busch , Jake Edge , Jonathan Corbet , Zhu Yanjun , Robin Murphy , Joerg Roedel , Will Deacon , Sagi Grimberg , Bjorn Helgaas , Logan Gunthorpe , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, Niklas Schnelle , Chuck Lever , Luis Chamberlain , Matthew Wilcox , Dan Williams , Kanchan Joshi , Chaitanya Kulkarni Subject: Re: [PATCH v9 10/24] mm/hmm: let users to tag specific PFN with DMA mapped bit Message-ID: <20250424081101.GA22989@lst.de> References: <0a7c1e06269eee12ff8912fe0da4b7692081fcde.1745394536.git.leon@kernel.org> <7185c055-fc9e-4510-a9bf-6245673f2f92@redhat.com> <20250423181706.GT1213339@ziepe.ca> <36891b0e-d5fa-4cf8-a181-599a20af1da3@redhat.com> <20250423233335.GW1213339@ziepe.ca> <20250424080744.GP48485@unreal> Precedence: bulk X-Mailing-List: linux-doc@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: <20250424080744.GP48485@unreal> User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Apr 24, 2025 at 11:07:44AM +0300, Leon Romanovsky wrote: > > I see, so yes order occupies 5 bits [-4,-5,-6,-7,-8] and the > > DMA_MAPPED overlaps, it should be 9 not 7 because of the backwardness. > > Thanks for the fix. Maybe we can use the chance to make the scheme less fragile? i.e. put flags in the high bits and derive the first valid bit from the pfn order?