Re: [PATCH v5 00/11] mempolicy2, mbind2, and weighted interleave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gregory Price <gregory.price@xxxxxxxxxxxx> writes:

>> >> > struct mpol_args {
>> >> >         /* Basic mempolicy settings */
>> >> >         __u16 mode;
>> >> >         __u16 mode_flags;
>> >> >         __s32 home_node;
>> >> >         __u64 pol_maxnodes;
>> >> 
>> >> I understand that we want to avoid hole in struct.  But I still feel
>> >> uncomfortable to use __u64 for a small.  But I don't have solution too.
>> >> Anyone else has some idea?
>> >>
>> >
>> > maxnode has been an `unsigned long` in every other interface for quite
>> > some time.  Seems better to keep this consistent rather than it suddenly
>> > become `unsigned long` over here and `unsigned short` over there.
>> 
>> I don't think that it matters.  The actual maximum node number will be
>> less than maximum `unsigned short`.
>> 
>
> the structure will end up being
>
> struct mpol_args {
> 	__u16 mode;
> 	__u16 mode_flags;
> 	__s32 home_node;
> 	__u16 pol_maxnodes;
> 	__u8  rsv[6];
> 	__aligned_u64 pol_nodes;
> 	__aligned_u64 il_weights;
> }
>
> If you're fine with that, i'll make the change.

This looks OK for me.  But, I don't know whether others think this is
better.

--
Best Regards,
Huang, Ying




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux