Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298925
| From | Cyrill Gorcunov <gorcunov@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC] mm: Rework virtual memory accounting |
| Date | 2015-12-29 10:50 +0100 |
| Message-ID | <qKZ4J-76v-5@gated-at.bofh.it> (permalink) |
| References | <qKNmV-7GX-1@gated-at.bofh.it> <qKPf3-sr-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Dec 28, 2015 at 03:10:02PM -0800, Andrew Morton wrote:
> On Tue, 29 Dec 2015 00:10:15 +0300 Cyrill Gorcunov <gorcunov@gmail.com> wrote:
...
>
> This clashes with
> mm-mmapc-remove-redundant-local-variables-for-may_expand_vm.patch,
> below. I resolved it thusly:
>
> bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)
> {
> if (mm->total_vm + npages > rlimit(RLIMIT_AS) >> PAGE_SHIFT)
> return false;
>
> if ((flags & (VM_WRITE | VM_SHARED | (VM_STACK_FLAGS &
> (VM_GROWSUP | VM_GROWSDOWN)))) == VM_WRITE)
> return mm->data_vm + npages <= rlimit(RLIMIT_DATA);
>
> return true;
> }
Thanks, Andrew!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH RFC] mm: Rework virtual memory accounting Cyrill Gorcunov <gorcunov@gmail.com> - 2015-12-28 22:20 +0100
Re: [PATCH RFC] mm: Rework virtual memory accounting Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-28 23:30 +0100
Re: [PATCH RFC] mm: Rework virtual memory accounting Cyrill Gorcunov <gorcunov@gmail.com> - 2015-12-29 10:50 +0100
Re: [PATCH RFC] mm: Rework virtual memory accounting Andrew Morton <akpm@linux-foundation.org> - 2015-12-29 00:20 +0100
Re: [PATCH RFC] mm: Rework virtual memory accounting Cyrill Gorcunov <gorcunov@gmail.com> - 2015-12-29 10:50 +0100
csiph-web