lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 Dec 2011 11:17:07 +1100
From:	Dave Chinner <david@...morbit.com>
To:	Hugh Dickins <hughd@...gle.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, Jan Kara <jack@...e.cz>,
	Mel Gorman <mgorman@...e.de>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH] radix_tree: expand comment on optimization

On Wed, Dec 21, 2011 at 03:57:16PM -0800, Hugh Dickins wrote:
> Expand comment on optimization in radix_tree_range_tag_if_tagged(),
> along the lines proposed by Dave Chinner.
> 
> Signed-off-by: Hugh Dickins <hughd@...gle.com>
> ---
> And with -p2, this patch will also apply to the rtth tree.
> 
>  lib/radix-tree.c |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> --- mmotm/lib/radix-tree.c	2011-12-16 20:40:26.152758485 -0800
> +++ linux/lib/radix-tree.c	2011-12-21 14:57:20.073657540 -0800
> @@ -703,7 +703,13 @@ unsigned long radix_tree_range_tag_if_ta
>  			node = node->parent;
>  		}
>  
> -		/* optimization: no need to walk up from this node again */
> +		/*
> +		 * Small optimization: now clear that node pointer.
> +		 * Since all of this slot's ancestors now have the tag set
> +		 * from setting it above, we have no further need to walk
> +		 * back up the tree setting tags, until we update slot to
> +		 * point to another radix_tree_node.
> +		 */
>  		node = NULL;

Looks good. I might remember why it was done now ;)

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ