Prev: linux-ide: hda: possibly failed opcode: 0x25 on Alpha with 2.6.34-rc3
Next: [PATCH]: x86: remove extra bootmem.h from arch/x86/mm/init_64.c
From: Minchan Kim on 15 Apr 2010 07:50 On Thu, Apr 15, 2010 at 8:43 PM, Tejun Heo <tj(a)kernel.org> wrote: > Hello, > > On 04/15/2010 07:21 PM, Minchan Kim wrote: >> kill alloc_pages_exact_node? >> Sorry but I can't understand your point. >> I don't want to kill user of alloc_pages_exact_node. >> That's opposite. >> I want to kill user of alloc_pages_node and change it with >> alloc_pages_any_node or alloc_pages_exact_node. :) > > I see, so... > > alloc_pages() -> alloc_pages_any_node() > alloc_pages_node() -> alloc_pages_exact_node() > > right? It just seems strange to me and different from usual naming > convention - ie. something which doesn't care about nodes usually > doesn't carry _node postfix. Anyways, no big deal, those names just > felt a bit strange to me. I don't want to remove alloc_pages for UMA system. #define alloc_pages alloc_page_sexact_node What I want to remove is just alloc_pages_node. :) Sorry for confusing you. -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Tejun Heo on 15 Apr 2010 07:50 Hello, On 04/15/2010 07:21 PM, Minchan Kim wrote: > kill alloc_pages_exact_node? > Sorry but I can't understand your point. > I don't want to kill user of alloc_pages_exact_node. > That's opposite. > I want to kill user of alloc_pages_node and change it with > alloc_pages_any_node or alloc_pages_exact_node. :) I see, so... alloc_pages() -> alloc_pages_any_node() alloc_pages_node() -> alloc_pages_exact_node() right? It just seems strange to me and different from usual naming convention - ie. something which doesn't care about nodes usually doesn't carry _node postfix. Anyways, no big deal, those names just felt a bit strange to me. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Christoph Lameter on 16 Apr 2010 12:10 On Thu, 15 Apr 2010, Minchan Kim wrote: > I don't want to remove alloc_pages for UMA system. alloc_pages is the same as alloc_pages_any_node so why have it? > #define alloc_pages alloc_page_sexact_node > > What I want to remove is just alloc_pages_node. :) Why remove it? If you want to get rid of -1 handling then check all the callsites and make sure that they are not using -1. Also could you define a constant for -1? -1 may have various meanings. One is the local node and the other is any node. The difference is if memory policies are obeyed or not. Note that alloc_pages follows memory policies whereas alloc_pages_node does not. Therefore alloc_pages() != alloc_pages_node( , -1) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Lee Schermerhorn on 16 Apr 2010 15:20 On Fri, 2010-04-16 at 11:07 -0500, Christoph Lameter wrote: > On Thu, 15 Apr 2010, Minchan Kim wrote: > > > I don't want to remove alloc_pages for UMA system. > > alloc_pages is the same as alloc_pages_any_node so why have it? > > > #define alloc_pages alloc_page_sexact_node > > > > What I want to remove is just alloc_pages_node. :) > > Why remove it? If you want to get rid of -1 handling then check all the > callsites and make sure that they are not using -1. > > Also could you define a constant for -1? -1 may have various meanings. One > is the local node and the other is any node. NUMA_NO_NODE is #defined as (-1) and can be used for this purpose. '-1' has been replaced by this in many cases. It can be interpreted as "No node specified" == "any node is acceptable". But, it also has multiple meanings. E.g., in the hugetlb sysfs attribute and sysctl functions it indicates the global hstates [all nodes] vs a per node hstate. So, I suppose one could define a NUMA_ANY_NODE, to make the intention clear at the call site. I believe that all usage of -1 to mean the local node has been removed, unless I missed one. Local allocation is now indicated by a mempolicy mode flag--MPOL_F_LOCAL. It's treated as a special case of MPOL_PREFERRED. > The difference is if memory > policies are obeyed or not. Note that alloc_pages follows memory policies > whereas alloc_pages_node does not. > > Therefore > > alloc_pages() != alloc_pages_node( , -1) > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo(a)kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: <a href=mailto:"dont(a)kvack.org"> email(a)kvack.org </a> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Minchan Kim on 18 Apr 2010 12:00
Hi, Christoph. On Fri, 2010-04-16 at 11:07 -0500, Christoph Lameter wrote: > On Thu, 15 Apr 2010, Minchan Kim wrote: > > > I don't want to remove alloc_pages for UMA system. > > alloc_pages is the same as alloc_pages_any_node so why have it? I don't want to force using '_node' postfix on UMA users. Maybe they don't care getting page from any node and event don't need to know about _NODE_. > > > #define alloc_pages alloc_page_sexact_node > > > > What I want to remove is just alloc_pages_node. :) > > Why remove it? If you want to get rid of -1 handling then check all the alloc_pages_node have multiple meaning as you said. So some of users misuses that API. I want to clear intention of user. > callsites and make sure that they are not using -1. Sure. I must do it before any progressing. > > Also could you define a constant for -1? -1 may have various meanings. One > is the local node and the other is any node. The difference is if memory > policies are obeyed or not. Note that alloc_pages follows memory policies > whereas alloc_pages_node does not. > > Therefore > > alloc_pages() != alloc_pages_node( , -1) > Yes, now it's totally different. On UMA, It's any node but on NUMA, local node. My concern is following as. alloc_pages_node means any node but it has nid argument. Why should user of alloc_pages who want to get page from any node pass nid argument? It's rather awkward. Some of user misunderstood it and used alloc_pages_node instead of alloc_pages_exact_node although he already know exact _NID_. Of course, it's not a BUG since if nid >= 0 it works well. But I want to remove such multiple meaning to clear intention of user. -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |