Re: No more bits in vm_area_struct's vm_flags.

From: KAMEZAWA Hiroyuki
Date: Mon Sep 28 2009 - 12:14:15 EST


Hugh Dickins wrote:
> On Mon, 28 Sep 2009, KAMEZAWA Hiroyuki wrote:
>>
>> What I dislike is making vm_flags to be long long ;)
>
> Why?
I'm sorry if my "dislike" sounds too strong.

Every time I see long long in the kernel, my concern is
"do I need spinlock to access this for 32bit arch ? is it safe ?".
(And it makes binary=>disassemble=>C (by eyes) a bit difficult)
Then, I don't like long long personally.

Another reason is some other calls like test_bit() cannot be used against
long long. (even if it's not used _now_)

Maybe vm->vm_flags will not require extra locks because
it can be protected by bigger lock as mmap_sem. Then, please make it
to be long long if its's recommended.

keeping vm_flags to be 32bit may makes vma_merge() ugly.
If so, long long is a choice.

Thanks,
-Kame


> Hugh
>


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