All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: David Hildenbrand <david@redhat.com>
Cc: Oscar Salvador <osalvador@suse.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Rich Felker <dalias@libc.org>,
	linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Balbir Singh <bsingharora@gmail.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Wei Yang <richard.weiyang@gmail.com>,
	linux-mm@kvack.org, Pavel Tatashin <pavel.tatashin@microsoft.com>,
	Arun KS <arunks@codeaurora.org>, "H. Peter Anvin" <hpa@zytor.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Rashmica Gupta <rashmica.g@gmail.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Paul Mackerras <paulus@samba.org>,
	Pavel Tatashin <pasha.tatashin@soleen.com>,
	linux-s390@vger.kernel.org,
	Michael Neuling <mikey@neuling.org>Stefano Stabellini <s>
Subject: Re: [PATCH RFCv2 0/4] mm/memory_hotplug: Introduce memory block types
Date: Thu, 20 Dec 2018 14:08:32 +0100	[thread overview]
Message-ID: <20181220130832.GH9104__33049.9587151737$1545311259$gmane$org@dhcp22.suse.cz> (raw)
In-Reply-To: <1b4afb6a-5f91-407d-6e6e-6a89b8cf5d56@redhat.com>

On Thu 20-12-18 13:58:16, David Hildenbrand wrote:
> On 30.11.18 18:59, David Hildenbrand wrote:
> > This is the second approach, introducing more meaningful memory block
> > types and not changing online behavior in the kernel. It is based on
> > latest linux-next.
> > 
> > As we found out during dicussion, user space should always handle onlining
> > of memory, in any case. However in order to make smart decisions in user
> > space about if and how to online memory, we have to export more information
> > about memory blocks. This way, we can formulate rules in user space.
> > 
> > One such information is the type of memory block we are talking about.
> > This helps to answer some questions like:
> > - Does this memory block belong to a DIMM?
> > - Can this DIMM theoretically ever be unplugged again?
> > - Was this memory added by a balloon driver that will rely on balloon
> >   inflation to remove chunks of that memory again? Which zone is advised?
> > - Is this special standby memory on s390x that is usually not automatically
> >   onlined?
> > 
> > And in short it helps to answer to some extend (excluding zone imbalances)
> > - Should I online this memory block?
> > - To which zone should I online this memory block?
> > ... of course special use cases will result in different anwers. But that's
> > why user space has control of onlining memory.
> > 
> > More details can be found in Patch 1 and Patch 3.
> > Tested on x86 with hotplugged DIMMs. Cross-compiled for PPC and s390x.
> > 
> > 
> > Example:
> > $ udevadm info -q all -a /sys/devices/system/memory/memory0
> > 	KERNEL=="memory0"
> > 	SUBSYSTEM=="memory"
> > 	DRIVER==""
> > 	ATTR{online}=="1"
> > 	ATTR{phys_device}=="0"
> > 	ATTR{phys_index}=="00000000"
> > 	ATTR{removable}=="0"
> > 	ATTR{state}=="online"
> > 	ATTR{type}=="boot"
> > 	ATTR{valid_zones}=="none"
> > $ udevadm info -q all -a /sys/devices/system/memory/memory90
> > 	KERNEL=="memory90"
> > 	SUBSYSTEM=="memory"
> > 	DRIVER==""
> > 	ATTR{online}=="1"
> > 	ATTR{phys_device}=="0"
> > 	ATTR{phys_index}=="0000005a"
> > 	ATTR{removable}=="1"
> > 	ATTR{state}=="online"
> > 	ATTR{type}=="dimm"
> > 	ATTR{valid_zones}=="Normal"
> > 
> > 
> > RFC -> RFCv2:
> > - Now also taking care of PPC (somehow missed it :/ )
> > - Split the series up to some degree (some ideas on how to split up patch 3
> >   would be very welcome)
> > - Introduce more memory block types. Turns out abstracting too much was
> >   rather confusing and not helpful. Properly document them.
> > 
> > Notes:
> > - I wanted to convert the enum of types into a named enum but this
> >   provoked all kinds of different errors. For now, I am doing it just like
> >   the other types (e.g. online_type) we are using in that context.
> > - The "removable" property should never have been named like that. It
> >   should have been "offlinable". Can we still rename that? E.g. boot memory
> >   is sometimes marked as removable ...
> > 
> 
> 
> Any feedback regarding the suggested block types would be very much
> appreciated!

I still do not like this much to be honest. I just didn't get to think
through this properly. My fear is that this is conflating an actual API
with the current implementation and as such will cause problems in
future. But I haven't really looked into your patches closely so I might
be wrong. Anyway I won't be able to look into it by the end of year.
-- 
Michal Hocko
SUSE Labs

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-12-20 13:08 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30 17:59 [PATCH RFCv2 0/4] mm/memory_hotplug: Introduce memory block types David Hildenbrand
2018-11-30 17:59 ` David Hildenbrand
2018-11-30 17:59 ` David Hildenbrand
2018-11-30 17:59 ` [PATCH RFCv2 1/4] " David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-12-01  1:25   ` Wei Yang
2018-12-01  1:25   ` Wei Yang
2018-12-01  1:25     ` Wei Yang
2018-12-01  1:25     ` Wei Yang
2018-12-01  1:25     ` Wei Yang
2018-12-03 10:32     ` David Hildenbrand
2018-12-03 10:32     ` David Hildenbrand
2018-12-03 10:32       ` David Hildenbrand
2018-12-03 10:32       ` David Hildenbrand
2018-12-03 10:32       ` David Hildenbrand
2018-12-03 20:58       ` Wei Yang
2018-12-03 20:58         ` Wei Yang
2018-12-03 20:58         ` Wei Yang
2018-12-03 20:58         ` Wei Yang
2018-12-03 20:58         ` Wei Yang
2018-12-03 20:58       ` Wei Yang
2018-11-30 17:59 ` David Hildenbrand
2018-11-30 17:59 ` [PATCH RFCv2 2/4] mm/memory_hotplug: Replace "bool want_memblock" by "int type" David Hildenbrand
2018-11-30 17:59 ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-12-01  1:50   ` Wei Yang
2018-12-01  1:50   ` Wei Yang
2018-12-01  1:50     ` Wei Yang
2018-12-01  1:50     ` Wei Yang
2018-12-03 10:33     ` David Hildenbrand
2018-12-03 10:33       ` David Hildenbrand
2018-12-03 10:33       ` David Hildenbrand
2018-12-03 10:33     ` David Hildenbrand
2018-11-30 17:59 ` [PATCH RFCv2 3/4] mm/memory_hotplug: Introduce and use more memory types David Hildenbrand
2018-11-30 17:59 ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-12-04  9:44   ` Michal Suchánek
2018-12-04  9:44   ` Michal Suchánek
2018-12-04  9:44     ` Michal Suchánek
2018-12-04  9:44     ` Michal Suchánek
2018-12-04  9:44     ` Michal Suchánek
2018-12-04  9:47     ` David Hildenbrand
2018-12-04  9:47     ` David Hildenbrand
2018-12-04  9:47       ` David Hildenbrand
2018-12-04  9:47       ` David Hildenbrand
2018-12-04  9:47       ` David Hildenbrand
2018-11-30 17:59 ` [PATCH RFCv2 4/4] mm/memory_hotplug: Drop MEMORY_TYPE_UNSPECIFIED David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59   ` David Hildenbrand
2018-11-30 17:59 ` David Hildenbrand
2018-12-01  0:48 ` [PATCH RFCv2 0/4] mm/memory_hotplug: Introduce memory block types Wei Yang
2018-12-01  0:48 ` Wei Yang
2018-12-01  0:48   ` Wei Yang
2018-12-01  0:48   ` Wei Yang
2018-12-20 12:58 ` David Hildenbrand
2018-12-20 12:58   ` David Hildenbrand
2018-12-20 12:58   ` David Hildenbrand
2018-12-20 13:08   ` Michal Hocko [this message]
2018-12-20 13:08   ` Michal Hocko
2018-12-20 13:08     ` Michal Hocko
2018-12-20 13:08     ` Michal Hocko
2018-12-20 13:16     ` David Hildenbrand
2018-12-20 13:16     ` David Hildenbrand
2018-12-20 13:16       ` David Hildenbrand
2018-12-20 13:16       ` David Hildenbrand
2019-03-27 16:03     ` David Hildenbrand
2019-03-27 16:03     ` David Hildenbrand
2019-03-27 16:03       ` David Hildenbrand
2019-03-27 16:03       ` David Hildenbrand
2018-12-20 12:58 ` David Hildenbrand
2018-11-30 17:59 David Hildenbrand

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='20181220130832.GH9104__33049.9587151737$1545311259$gmane$org@dhcp22.suse.cz' \
    --to=mhocko@kernel.org \
    --cc=arunks@codeaurora.org \
    --cc=benh@kernel.crashing.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bsingharora@gmail.com \
    --cc=dalias@libc.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=kys@microsoft.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mikey@neuling.org \
    --cc=osalvador@suse.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=paulus@samba.org \
    --cc=pavel.tatashin@microsoft.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rashmica.g@gmail.com \
    --cc=richard.weiyang@gmail.com \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.