[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 3/3] mm: MEMF_node should handle changes in nodeid_t size
>>> On 25.02.15 at 14:30, <boris.ostrovsky@xxxxxxxxxx> wrote: > On 02/25/2015 05:35 AM, Jan Beulich wrote: >>>>> On 24.02.15 at 20:11, <boris.ostrovsky@xxxxxxxxxx> wrote: >>> @@ -121,10 +123,12 @@ struct npfec { >>> #define _MEMF_exact_node 4 >>> #define MEMF_exact_node (1U<<_MEMF_exact_node) >>> #define _MEMF_node 8 >>> -#define MEMF_node(n) ((((n)+1)&0xff)<<_MEMF_node) >>> +#define MEMF_node(n) ((((n)+1) & MEMF_node_mask) << _MEMF_node) >>> #define _MEMF_bits 24 >>> #define MEMF_bits(n) ((n)<<_MEMF_bits) >>> >>> +#define MEMF2NODE(memflags) (MASK_EXTR(memflags, MEMF_node_mask) - 1) >> As this is being used just once, I don't really see a need for it to be >> exposed globally. Perhaps do away with the macro, but at the very >> least confine it to page_alloc.c. > > I intentionally put it here: we have macro to encode ('put', so to > speak) nodeID in memflags in this file (by adding one to it) and so I > felt that we don't need to expose this encoding outside of this file by > providing a "get" macro. Hmm, don't know. The encoding one obviously is needed in various places, while the decoding one is not supposed to be needed elsewhere. But if you strongly feel so, I can live with that macro staying here. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |