* Re: [memcg:since-3.12 75/75] fs/proc/meminfo.c:undefined reference to `vm_commit_limit'
[not found] <527b74a0.xBELNKuc6Ws8XONb%fengguang.wu@intel.com>
@ 2013-11-07 13:25 ` Michal Hocko
2013-11-07 20:51 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Michal Hocko @ 2013-11-07 13:25 UTC (permalink / raw)
To: Andrew Morton; +Cc: Jerome Marchand, kbuild-all, linux-mm, LKML, fengguang.wu
On Thu 07-11-13 19:08:16, Wu Fengguang wrote:
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git since-3.12
> head: 2f11d7af8df66cb4f217b6293ad8189aa101d601
> commit: 2f11d7af8df66cb4f217b6293ad8189aa101d601 [75/75] mm-factor-commit-limit-calculation-fix
> config: make ARCH=blackfin BF526-EZBRD_defconfig
>
> All error/warnings:
>
> mm/built-in.o: In function `__vm_enough_memory':
> (.text+0x11b4c): undefined reference to `vm_commit_limit'
> fs/built-in.o: In function `meminfo_proc_show':
> >> fs/proc/meminfo.c:(.text+0x37ef0): undefined reference to `vm_commit_limit'
Andrew, it seems that moving vm_commit_limit out of mman.h is not that
easy because it breaks NOMMU configurations. mm/mmap.o is not part of
the nommu build apparently.
So either we move it back to mman.h or put it somewhere else. I do not
have a good idea where, though.
I have dropped mm-factor-commit-limit-calculation-fix from mm-git tree
for now.
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [memcg:since-3.12 75/75] fs/proc/meminfo.c:undefined reference to `vm_commit_limit'
2013-11-07 13:25 ` [memcg:since-3.12 75/75] fs/proc/meminfo.c:undefined reference to `vm_commit_limit' Michal Hocko
@ 2013-11-07 20:51 ` Andrew Morton
2013-11-07 21:08 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2013-11-07 20:51 UTC (permalink / raw)
To: Michal Hocko; +Cc: Jerome Marchand, kbuild-all, linux-mm, LKML, fengguang.wu
On Thu, 7 Nov 2013 14:25:05 +0100 Michal Hocko <mhocko@suse.cz> wrote:
> On Thu 07-11-13 19:08:16, Wu Fengguang wrote:
> > tree: git://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git since-3.12
> > head: 2f11d7af8df66cb4f217b6293ad8189aa101d601
> > commit: 2f11d7af8df66cb4f217b6293ad8189aa101d601 [75/75] mm-factor-commit-limit-calculation-fix
> > config: make ARCH=blackfin BF526-EZBRD_defconfig
> >
> > All error/warnings:
> >
> > mm/built-in.o: In function `__vm_enough_memory':
> > (.text+0x11b4c): undefined reference to `vm_commit_limit'
> > fs/built-in.o: In function `meminfo_proc_show':
> > >> fs/proc/meminfo.c:(.text+0x37ef0): undefined reference to `vm_commit_limit'
>
> Andrew, it seems that moving vm_commit_limit out of mman.h is not that
> easy because it breaks NOMMU configurations. mm/mmap.o is not part of
> the nommu build apparently.
>
> So either we move it back to mman.h or put it somewhere else. I do not
> have a good idea where, though.
>
util.c?
diff -puN mm/mmap.c~mm-factor-commit-limit-calculation-fix-fix mm/mmap.c
--- a/mm/mmap.c~mm-factor-commit-limit-calculation-fix-fix
+++ a/mm/mmap.c
@@ -110,15 +110,6 @@ unsigned long vm_memory_committed(void)
EXPORT_SYMBOL_GPL(vm_memory_committed);
/*
- * Commited memory limit enforced when OVERCOMMIT_NEVER policy is used
- */
-unsigned long vm_commit_limit(void)
-{
- return ((totalram_pages - hugetlb_total_pages())
- * sysctl_overcommit_ratio / 100) + total_swap_pages;
-}
-
-/*
* Check that a process has enough memory to allocate a new virtual
* mapping. 0 means there is enough memory for the allocation to
* succeed and -ENOMEM implies there is not.
--- a/mm/util.c~mm-factor-commit-limit-calculation-fix-fix
+++ a/mm/util.c
@@ -7,6 +7,9 @@
#include <linux/security.h>
#include <linux/swap.h>
#include <linux/swapops.h>
+#include <linux/mman.h>
+#include <linux/hugetlb.h>
+
#include <asm/uaccess.h>
#include "internal.h"
@@ -398,6 +401,16 @@ struct address_space *page_mapping(struc
return mapping;
}
+/*
+ * Commited memory limit enforced when OVERCOMMIT_NEVER policy is used
+ */
+unsigned long vm_commit_limit(void)
+{
+ return ((totalram_pages - hugetlb_total_pages())
+ * sysctl_overcommit_ratio / 100) + total_swap_pages;
+}
+
+
/* Tracepoints definitions. */
EXPORT_TRACEPOINT_SYMBOL(kmalloc);
EXPORT_TRACEPOINT_SYMBOL(kmem_cache_alloc);
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [memcg:since-3.12 75/75] fs/proc/meminfo.c:undefined reference to `vm_commit_limit'
2013-11-07 20:51 ` Andrew Morton
@ 2013-11-07 21:08 ` Randy Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2013-11-07 21:08 UTC (permalink / raw)
To: Andrew Morton, Michal Hocko
Cc: Jerome Marchand, kbuild-all, linux-mm, LKML, fengguang.wu
On 11/07/13 12:51, Andrew Morton wrote:
> On Thu, 7 Nov 2013 14:25:05 +0100 Michal Hocko <mhocko@suse.cz> wrote:
>
>> On Thu 07-11-13 19:08:16, Wu Fengguang wrote:
>>> tree: git://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git since-3.12
>>> head: 2f11d7af8df66cb4f217b6293ad8189aa101d601
>>> commit: 2f11d7af8df66cb4f217b6293ad8189aa101d601 [75/75] mm-factor-commit-limit-calculation-fix
>>> config: make ARCH=blackfin BF526-EZBRD_defconfig
>>>
>>> All error/warnings:
>>>
>>> mm/built-in.o: In function `__vm_enough_memory':
>>> (.text+0x11b4c): undefined reference to `vm_commit_limit'
>>> fs/built-in.o: In function `meminfo_proc_show':
>>>>> fs/proc/meminfo.c:(.text+0x37ef0): undefined reference to `vm_commit_limit'
>>
>> Andrew, it seems that moving vm_commit_limit out of mman.h is not that
>> easy because it breaks NOMMU configurations. mm/mmap.o is not part of
>> the nommu build apparently.
>>
>> So either we move it back to mman.h or put it somewhere else. I do not
>> have a good idea where, though.
>>
>
> util.c?
>
> diff -puN mm/mmap.c~mm-factor-commit-limit-calculation-fix-fix mm/mmap.c
> --- a/mm/mmap.c~mm-factor-commit-limit-calculation-fix-fix
> +++ a/mm/mmap.c
> @@ -110,15 +110,6 @@ unsigned long vm_memory_committed(void)
> EXPORT_SYMBOL_GPL(vm_memory_committed);
>
> /*
> - * Commited memory limit enforced when OVERCOMMIT_NEVER policy is used
> - */
> -unsigned long vm_commit_limit(void)
> -{
> - return ((totalram_pages - hugetlb_total_pages())
> - * sysctl_overcommit_ratio / 100) + total_swap_pages;
> -}
> -
> -/*
> * Check that a process has enough memory to allocate a new virtual
> * mapping. 0 means there is enough memory for the allocation to
> * succeed and -ENOMEM implies there is not.
> --- a/mm/util.c~mm-factor-commit-limit-calculation-fix-fix
> +++ a/mm/util.c
> @@ -7,6 +7,9 @@
> #include <linux/security.h>
> #include <linux/swap.h>
> #include <linux/swapops.h>
> +#include <linux/mman.h>
> +#include <linux/hugetlb.h>
> +
> #include <asm/uaccess.h>
>
> #include "internal.h"
> @@ -398,6 +401,16 @@ struct address_space *page_mapping(struc
> return mapping;
> }
>
> +/*
> + * Commited memory limit enforced when OVERCOMMIT_NEVER policy is used
Committed
> + */
> +unsigned long vm_commit_limit(void)
> +{
> + return ((totalram_pages - hugetlb_total_pages())
> + * sysctl_overcommit_ratio / 100) + total_swap_pages;
> +}
> +
> +
> /* Tracepoints definitions. */
> EXPORT_TRACEPOINT_SYMBOL(kmalloc);
> EXPORT_TRACEPOINT_SYMBOL(kmem_cache_alloc);
> _
>
> --
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-07 21:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <527b74a0.xBELNKuc6Ws8XONb%fengguang.wu@intel.com>
2013-11-07 13:25 ` [memcg:since-3.12 75/75] fs/proc/meminfo.c:undefined reference to `vm_commit_limit' Michal Hocko
2013-11-07 20:51 ` Andrew Morton
2013-11-07 21:08 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).