On 12/12/2013 01:00 PM, Alex Thorlton wrote:
This part of the patch adds a tunable to /sys/kernel/mm/transparent_hugepage called threshold. This threshold determines how many pages a user must fault in from a single node before a temporary compound page is turned into a THP.
+++ b/mm/huge_memory.c @@ -44,6 +44,9 @@ unsigned long transparent_hugepage_flags __read_mostly = (1<<TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG)| (1<<TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG); +/* default to 1 page threshold for handing out thps; maintains old behavior */ +static int transparent_hugepage_threshold = 1;
I assume the motivation for writing all this code is that "1" was not a good value in your tests. That makes me wonder, why should 1 be the default value with your patches? If there is a better value, why should we not use that? What is the upside of using a better value? What is the downside? Is there a value that would to bound the downside, so it is almost always smaller than the upside? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>