<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On Wednesday 22 March 2017 09:07 AM,
Aneesh Kumar K.V wrote:<br>
</div>
<blockquote
cite="mid:1490153823-29241-17-git-send-email-aneesh.kumar@linux.vnet.ibm.com"
type="cite">
<pre wrap="">As we start supporting larger address space (>128TB), we want to give
architecture a control on max task size of an application which is different
from the TASK_SIZE. For ex: ppc64 needs to track the base page size of a segment
and it is copied from mm_context_t to PACA on each context switch. If we know that
application has not used an address range above 128TB we only need to copy
details about 128TB range to PACA. This will help in improving context switch
performance by avoiding larger copy operation.
Cc: Kirill A. Shutemov <a class="moz-txt-link-rfc2396E" href="mailto:kirill.shutemov@linux.intel.com"><kirill.shutemov@linux.intel.com></a>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:linux-mm@kvack.org">linux-mm@kvack.org</a>
Cc: Andrew Morton <a class="moz-txt-link-rfc2396E" href="mailto:akpm@linux-foundation.org"><akpm@linux-foundation.org></a>
Signed-off-by: Aneesh Kumar K.V <a class="moz-txt-link-rfc2396E" href="mailto:aneesh.kumar@linux.vnet.ibm.com"><aneesh.kumar@linux.vnet.ibm.com></a>
---
fs/exec.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/exec.c b/fs/exec.c
index 65145a3df065..5550a56d03c3 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1308,6 +1308,14 @@ void would_dump(struct linux_binprm *bprm, struct file *file)
}
EXPORT_SYMBOL(would_dump);
+#ifndef arch_init_task_size
+static inline void arch_init_task_size(void)
+{
+ current->mm->task_size = TASK_SIZE;
+}
+#define arch_init_task_size arch_init_task_size
+#endif</pre>
</blockquote>
<br>
<font size="-1">Why not a proper CONFIG_ARCH_DEFINED_TASK_SIZE kind
of option for this ? Also<br>
are there no assumptions about task current->mm->size being
TASK_SIZE in other<br>
places which might get broken ?<br>
</font><font size="-1"></font>
</body>
</html>