From: Dmitry Safonov <0x7f454c46@gmail.com>
To: Dmitry Safonov <dima@arista.com>, linux-kernel@vger.kernel.org
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Lutomirski <luto@kernel.org>,
Brian Geffon <bgeffon@google.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Chen Wandun <chenwandun@huawei.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Dan Williams <dan.j.williams@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Hugh Dickins <hughd@google.com>, Ingo Molnar <mingo@redhat.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
John Hubbard <jhubbard@nvidia.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Minchan Kim <minchan@kernel.org>,
Ralph Campbell <rcampbell@nvidia.com>,
Russell King <linux@armlinux.org.uk>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Thomas Gleixner <tglx@linutronix.de>,
Vishal Verma <vishal.l.verma@intel.com>,
Vlastimil Babka <vbabka@suse.cz>,
Wei Yongjun <weiyongjun1@huawei.com>,
Will Deacon <will@kernel.org>
Subject: Re: [PATCH] mm/mremap: Don't account pages in vma_to_resize()
Date: Wed, 21 Jul 2021 14:08:55 +0100 [thread overview]
Message-ID: <cd8fd36b-eba7-039b-f823-f62d62c503b8@gmail.com> (raw)
In-Reply-To: <20210721124949.517217-1-dima@arista.com>
On 7/21/21 1:49 PM, Dmitry Safonov wrote:
> All this vm_unacct_memory(charged) dance seems to complicate the life
> without a good reason. Furthermore, it seems not always done right on
> error-pathes in mremap_to().
> And worse than that: this `charged' difference is sometimes
> double-accounted for growing MREMAP_DONTUNMAP mremap()s in move_vma():
> : if (security_vm_enough_memory_mm(mm, new_len >> PAGE_SHIFT))
>
> Let's not do this.
> Account memory in mremap() fast-path for growing VMAs or in move_vma()
> for actually moving things.
And this one is also wrong: the diff for growing vma should be accounted
for !MREMAP_DONTUNMAP too.
Sending v2...
Thanks,
Dmitry
prev parent reply other threads:[~2021-07-21 13:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-21 12:49 Dmitry Safonov
2021-07-21 13:08 ` Dmitry Safonov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd8fd36b-eba7-039b-f823-f62d62c503b8@gmail.com \
--to=0x7f454c46@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bgeffon@google.com \
--cc=catalin.marinas@arm.com \
--cc=chenwandun@huawei.com \
--cc=dan.carpenter@oracle.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dima@arista.com \
--cc=hughd@google.com \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luto@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=minchan@kernel.org \
--cc=mingo@redhat.com \
--cc=rcampbell@nvidia.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=vishal.l.verma@intel.com \
--cc=wangkefeng.wang@huawei.com \
--cc=weiyongjun1@huawei.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®