linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hoeun Ryu <hoeun.ryu@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
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: Wed, 19 Apr 2017 14:32:14 +0900	[thread overview]
Message-ID: <CEE04495-95EF-4A98-A85F-5C3537072BCE@gmail.com> (raw)
In-Reply-To: <20170418065946.GB22360@dhcp22.suse.cz>


> On Apr 18, 2017, at 3:59 PM, Michal Hocko <mhocko@kernel.org> wrote:
> 
>> 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.

I just think that it would be good to make it robust against various kind of errors.
You might think that's not an enough reason to do so though.

> 
> Thanks
> 
> -- 
> Michal Hocko
> SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-04-19  5:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18  5:48 Hoeun Ryu
2017-04-18  6:59 ` Michal Hocko
2017-04-19  5:32   ` Hoeun Ryu [this message]
  -- strict thread matches above, loose matches on Subject: below --
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=CEE04495-95EF-4A98-A85F-5C3537072BCE@gmail.com \
    --to=hoeun.ryu@gmail.com \
    --cc=adilger@dilger.ca \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=hch@infradead.org \
    --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=mhocko@kernel.org \
    --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