From: Jeff Liu <jeff.liu@oracle.com>
To: Mark Tinguely <tinguely@sgi.com>
Cc: Eric Sandeen <sandeen@sandeen.net>, "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs: improve xfs_bitmap_empty()
Date: Sat, 01 Feb 2014 11:48:48 +0800 [thread overview]
Message-ID: <52EC6EA0.9000501@oracle.com> (raw)
In-Reply-To: <52EBCF12.1020403@sgi.com>
On 02/01 2014 00:28 AM, Mark Tinguely wrote:
> On 01/31/14 09:51, Jeff Liu wrote:
>>
>> On 01/31 2014 23:30 PM, Eric Sandeen wrote:
>>> On 1/31/14, 9:28 AM, Jeff Liu wrote:
>>>>
>>>> On 01/31 2014 23:07 PM, Eric Sandeen wrote:
>>>>> On 1/31/14, 8:13 AM, Jeff Liu wrote:
>>>>>> From: Jie Liu<jeff.liu@oracle.com>
>>>>>>
>>>>>> There is no need to travel through the whole bitmap items to verify
>>>>>> if the bitmap array is empty or not, instead, just return 0 directly
>>>>>> if an item is detected in bitmap array.
>>>>>>
>>>>>> Signed-off-by: Jie Liu<jeff.liu@oracle.com>
>>>>>
>>>>> Makes sense (and the long loop was my fault, I guess, but it's
>>>>> better than it was, see commit 24ad33f!)
>>>>
>>>> Ah, you have killed a lots code there! :)
>>>>> Reviewed-by: Eric Sandeen<sandeen@redhat.com>
>>>>>
>>>>> I wonder if something like:
>>>>>
>>>>> return (find_first_set(map, size) == size);
>>>>>
>>>>> would be faster (or if it'd be worth it)...?
>>>>> Probably not. :)
>>>>>
>>>>
>>>> Well, when I looking through our bitmap source, I once thought if
>>>> we can replace the current code with the generic bitmap library.
>>>> However, our map is uint rather than unsigned long...
>>>
>>> Technically the unsigned long (pointer) is just the bitmap address,
>>> I think.
>>
>> Yeah, so this might worth to try on long terms.
>>
>
> The blf_data_map[] is int aligned, not long aligned.
> You could reflect the alignment difference in the offset or
> change the alignment in the structure.
>
For now, I think we can not simply turn to generic bitmap just because
of the alignment difference on 64-bits OS.
Thanks,
-Jeff
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-02-01 3:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-31 14:13 [PATCH] xfs: improve xfs_bitmap_empty() Jeff Liu
2014-01-31 15:07 ` Eric Sandeen
2014-01-31 15:28 ` Jeff Liu
2014-01-31 15:30 ` Eric Sandeen
2014-01-31 15:51 ` Jeff Liu
2014-01-31 16:28 ` Mark Tinguely
2014-01-31 16:47 ` Eric Sandeen
2014-02-01 3:48 ` Jeff Liu [this message]
2014-02-02 21:52 ` Dave Chinner
2014-02-04 15:10 ` Jeff Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52EC6EA0.9000501@oracle.com \
--to=jeff.liu@oracle.com \
--cc=sandeen@sandeen.net \
--cc=tinguely@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.