Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752731AbcCKVkX (ORCPT ); Fri, 11 Mar 2016 16:40:23 -0500 Received: from mail-ob0-f173.google.com ([209.85.214.173]:36183 "EHLO mail-ob0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752616AbcCKVkU (ORCPT ); Fri, 11 Mar 2016 16:40:20 -0500 MIME-Version: 1.0 In-Reply-To: <1457730784-9890-2-git-send-email-matthew.r.wilcox@intel.com> References: <1457730784-9890-1-git-send-email-matthew.r.wilcox@intel.com> <1457730784-9890-2-git-send-email-matthew.r.wilcox@intel.com> Date: Fri, 11 Mar 2016 13:40:20 -0800 Message-ID: Subject: Re: [PATCH 1/3] pfn_t: Change the encoding From: Dan Williams To: Matthew Wilcox Cc: "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" , Linux MM , Matthew Wilcox , Dave Hansen Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 646 Lines: 13 On Fri, Mar 11, 2016 at 1:13 PM, Matthew Wilcox wrote: > By moving the flag bits to the bottom, we encourage commonality > between SGs with pages and those using pfn_t. We can also then insert > a pfn_t into a radix tree, as it uses the same two bits for indirect & > exceptional indicators. It's not immediately clear to me what we gain with SG entry commonality. The down side is that we lose the property that pfn_to_pfn_t() is a nop. This was Dave's suggestion so that the nominal case did not change the binary layout of a typical pfn. Can we just bit swizzle a pfn_t on insertion/retrieval from the radix?