Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Hoeun Ryu <hoeun.ryu@gmail.com>
Cc: hch@infradead.org, khandual@linux.vnet.ibm.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Roman Pen <r.peniaev@gmail.com>,
	Andreas Dilger <adilger@dilger.ca>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Ingo Molnar <mingo@kernel.org>, zijun_hu <zijun_hu@htc.com>,
	Matthew Wilcox <mawilcox@microsoft.com>,
	Thomas Garnier <thgarnie@google.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	linux-arch@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm: add VM_STATIC flag to vmalloc and prevent from removing the areas
Date: Tue, 18 Apr 2017 08:59:46 +0200	[thread overview]
Message-ID: <20170418065946.GB22360@dhcp22.suse.cz> (raw)
In-Reply-To: <1492494570-21068-1-git-send-email-hoeun.ryu@gmail.com>

On Tue 18-04-17 14:48:39, Hoeun Ryu wrote:
>  vm_area_add_early/vm_area_register_early() are used to reserve vmalloc area
> during boot process and those virtually mapped areas are never unmapped.
> So `OR` VM_STATIC flag to the areas in vmalloc_init() when importing
> existing vmlist entries and prevent those areas from being removed from the
> rbtree by accident.

Has this been a problem in the past or currently so that it is worth
handling?

> This flags can be also used by other vmalloc APIs to
> specify that the area will never go away.

Do we have a user for that?

> This makes remove_vm_area() more robust against other kind of errors (eg.
> programming errors).

Well, yes it will help to prevent from vfree(early_mem) but we have 4
users of vm_area_register_early so I am really wondering whether this is
worth additional code. It would really help to understand your
motivation for the patch if we were explicit about the problem you are
trying to solve.

Thanks

-- 
Michal Hocko
SUSE Labs

  parent reply	other threads:[~2017-04-18  6:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18  5:48 [PATCH v2] mm: add VM_STATIC flag to vmalloc and prevent from removing the areas Hoeun Ryu
2017-04-18  5:48 ` Hoeun Ryu
2017-04-18  6:59 ` Michal Hocko [this message]
2017-04-19  5:32   ` Hoeun Ryu
2017-04-19  5:32     ` Hoeun Ryu
  -- strict thread matches above, loose matches on Subject: below --
2017-04-18  2:26 Hoeun Ryu
2017-04-18  2:26 ` Hoeun Ryu

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=20170418065946.GB22360@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=adilger@dilger.ca \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=hch@infradead.org \
    --cc=hoeun.ryu@gmail.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mawilcox@microsoft.com \
    --cc=mingo@kernel.org \
    --cc=r.peniaev@gmail.com \
    --cc=thgarnie@google.com \
    --cc=zijun_hu@htc.com \
    /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