From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751943AbbCTPO5 (ORCPT ); Fri, 20 Mar 2015 11:14:57 -0400 Received: from zimbra13.linbit.com ([212.69.166.240]:51198 "EHLO zimbra13.linbit.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbbCTPOz (ORCPT ); Fri, 20 Mar 2015 11:14:55 -0400 Date: Fri, 20 Mar 2015 16:14:50 +0100 From: Lars Ellenberg To: Akinobu Mita Cc: linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH] drbd: use bitmap_weight() Message-ID: <20150320151450.GG3556@soda.linbit> Mail-Followup-To: Akinobu Mita , linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com References: <1426295577-10836-1-git-send-email-akinobu.mita@gmail.com> <1426295577-10836-4-git-send-email-akinobu.mita@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426295577-10836-4-git-send-email-akinobu.mita@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 14, 2015 at 10:12:56AM +0900, Akinobu Mita wrote: > Use bitmap_weight to count the total number of bits set in bitmap. > This change just simplifies the code a bit. "Simplifies", not sure about that, but ok, maybe. For the "bm_set_full_words_within_one_page", I disagree. I think it is more cpu cache friendly to hweight_long then set to ~0UL each word in turn, than to first bitmap_weight() all words, then bitmap_fill() all words. Thanks, Lars Ellenberg BTW, you swapped names and email addresses of phil and me. Are those listed incorrectly somewhere, or was that just a mishap on your part?