* [PATCH] radix-tree: fix comment about "exceptional" bits
@ 2016-07-20 6:55 ` Ross Zwisler
0 siblings, 0 replies; 4+ messages in thread
From: Ross Zwisler @ 2016-07-20 6:55 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, linux-nvdimm, Dave Chinner, Jan Kara,
Konstantin Khlebnikov
The bottom two bits of radix tree entries are reserved for special use by
the radix tree code itself. A comment detailing their usage was added by:
commit 3bcadd6fa6c4 ("radix-tree: free up the bottom bit of exceptional
entries for reuse")
This comment states that if the bottom two bits are '11', this means that
this is a locked exceptional entry.
It turns out that this bit combination was never actually used. Radix tree
locking for DAX was indeed implemented, but it actually used the third LSB:
/* We use lowest available exceptional entry bit for locking */
#define RADIX_DAX_ENTRY_LOCK (1 << RADIX_TREE_EXCEPTIONAL_SHIFT)
This locking code was also made specific to the DAX code instead of being
generally implemented in radix-tree.h.
So, fix the comment.
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
---
include/linux/radix-tree.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index cb4b7e8..f0fb327 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -35,7 +35,7 @@
* 00 - data pointer
* 01 - internal entry
* 10 - exceptional entry
- * 11 - locked exceptional entry
+ * 11 - this bit combination is currently unused/reserved
*
* The internal entry may be a pointer to the next level in the tree, a
* sibling entry, or an indicator that the entry in this slot has been moved
--
2.7.4
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] radix-tree: fix comment about "exceptional" bits
@ 2016-07-20 6:55 ` Ross Zwisler
0 siblings, 0 replies; 4+ messages in thread
From: Ross Zwisler @ 2016-07-20 6:55 UTC (permalink / raw)
To: linux-kernel
Cc: Ross Zwisler, Andrew Morton, Dan Williams, Dave Chinner,
Jan Kara, linux-nvdimm, Konstantin Khlebnikov
The bottom two bits of radix tree entries are reserved for special use by
the radix tree code itself. A comment detailing their usage was added by:
commit 3bcadd6fa6c4 ("radix-tree: free up the bottom bit of exceptional
entries for reuse")
This comment states that if the bottom two bits are '11', this means that
this is a locked exceptional entry.
It turns out that this bit combination was never actually used. Radix tree
locking for DAX was indeed implemented, but it actually used the third LSB:
/* We use lowest available exceptional entry bit for locking */
#define RADIX_DAX_ENTRY_LOCK (1 << RADIX_TREE_EXCEPTIONAL_SHIFT)
This locking code was also made specific to the DAX code instead of being
generally implemented in radix-tree.h.
So, fix the comment.
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
---
include/linux/radix-tree.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index cb4b7e8..f0fb327 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -35,7 +35,7 @@
* 00 - data pointer
* 01 - internal entry
* 10 - exceptional entry
- * 11 - locked exceptional entry
+ * 11 - this bit combination is currently unused/reserved
*
* The internal entry may be a pointer to the next level in the tree, a
* sibling entry, or an indicator that the entry in this slot has been moved
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] radix-tree: fix comment about "exceptional" bits
2016-07-20 6:55 ` Ross Zwisler
@ 2016-07-20 13:10 ` Johannes Thumshirn
-1 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2016-07-20 13:10 UTC (permalink / raw)
To: Ross Zwisler
Cc: linux-nvdimm, Dave Chinner, linux-kernel, Jan Kara,
Andrew Morton, Konstantin Khlebnikov
On Wed, Jul 20, 2016 at 12:55:31AM -0600, Ross Zwisler wrote:
> The bottom two bits of radix tree entries are reserved for special use by
> the radix tree code itself. A comment detailing their usage was added by:
>
> commit 3bcadd6fa6c4 ("radix-tree: free up the bottom bit of exceptional
> entries for reuse")
>
> This comment states that if the bottom two bits are '11', this means that
> this is a locked exceptional entry.
>
> It turns out that this bit combination was never actually used. Radix tree
> locking for DAX was indeed implemented, but it actually used the third LSB:
>
> /* We use lowest available exceptional entry bit for locking */
> #define RADIX_DAX_ENTRY_LOCK (1 << RADIX_TREE_EXCEPTIONAL_SHIFT)
>
> This locking code was also made specific to the DAX code instead of being
> generally implemented in radix-tree.h.
>
> So, fix the comment.
>
> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] radix-tree: fix comment about "exceptional" bits
@ 2016-07-20 13:10 ` Johannes Thumshirn
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2016-07-20 13:10 UTC (permalink / raw)
To: Ross Zwisler
Cc: linux-kernel, Andrew Morton, linux-nvdimm, Dave Chinner,
Jan Kara, Konstantin Khlebnikov
On Wed, Jul 20, 2016 at 12:55:31AM -0600, Ross Zwisler wrote:
> The bottom two bits of radix tree entries are reserved for special use by
> the radix tree code itself. A comment detailing their usage was added by:
>
> commit 3bcadd6fa6c4 ("radix-tree: free up the bottom bit of exceptional
> entries for reuse")
>
> This comment states that if the bottom two bits are '11', this means that
> this is a locked exceptional entry.
>
> It turns out that this bit combination was never actually used. Radix tree
> locking for DAX was indeed implemented, but it actually used the third LSB:
>
> /* We use lowest available exceptional entry bit for locking */
> #define RADIX_DAX_ENTRY_LOCK (1 << RADIX_TREE_EXCEPTIONAL_SHIFT)
>
> This locking code was also made specific to the DAX code instead of being
> generally implemented in radix-tree.h.
>
> So, fix the comment.
>
> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-20 13:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-20 6:55 [PATCH] radix-tree: fix comment about "exceptional" bits Ross Zwisler
2016-07-20 6:55 ` Ross Zwisler
2016-07-20 13:10 ` Johannes Thumshirn
2016-07-20 13:10 ` Johannes Thumshirn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.