[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140524.175727.1149146448761347899.davem@davemloft.net>
Date: Sat, 24 May 2014 17:57:27 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: crquan@...il.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] dev-alloc-name-by-check-name-existence.patch
From: Cheng Renquan <crquan@...il.com>
Date: Sat, 24 May 2014 14:46:51 -0700
> Nowadays the net_device names have been mounted on a hash table,
> check name existence should be much faster than ever before, hence
> the extra page of memory for bitmap scanning is no longer needed.
>
> Signed-off-by: Cheng Renquan <crquan@...il.com>
The cost is iterating creating the string over and over again
and then doing the hash lookup each time.
Whereas the bitmap lookup is one word sized load for every
BITS_PER_LONG indexes checked.
Did you even test your change with large numbers of devices?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists