All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: David Hildenbrand <david@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	linux-mm@kvack.org, Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>, Huang Ying <ying.huang@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Pavel Tatashin <pasha.tatashin@oracle.com>,
	Miles Chen <miles.chen@mediatek.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Rik van Riel <riel@redhat.com>, James Hogan <jhogan@kernel.org>,
	"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC 2/8] mm: introduce PG_offline
Date: Sun, 22 Apr 2018 07:02:46 -0700	[thread overview]
Message-ID: <20180422140246.GA30714@bombadil.infradead.org> (raw)
In-Reply-To: <7db70df4-c714-574c-5b14-898c1cf49af6@redhat.com>

On Sun, Apr 22, 2018 at 10:17:31AM +0200, David Hildenbrand wrote:
> On 22.04.2018 05:01, Matthew Wilcox wrote:
> > On Sat, Apr 21, 2018 at 06:52:18PM +0200, Vlastimil Babka wrote:
> >> Sounds like your newly introduced "page types" could be useful here? I
> >> don't suppose those offline pages would be using mapcount which is
> >> aliased there?
> > 
> > Oh, that's a good point!  Yes, this is a perfect use for page_type.
> > We have something like twenty bits available there.
> > 
> > Now you've got me thinking that we can move PG_hwpoison and PG_reserved
> > to be page_type flags too.  That'll take us from 23 to 21 bits (on 32-bit,
> > with PG_UNCACHED)
> 
> Some things to clarify here. I modified the current RFC to also allow
> PG_offline on allocated (ballooned) pages (e.g. virtio-balloon).
> 
> kdump based dump tools can then easily identify which pages are not to
> be dumped (either because the content is invalid or not accessible).
> 
> I previously stated that ballooned pages would be marked as PG_reserved,
> which is not true (at least not for virtio-balloon). However this allows
> me to detect if all pages in a section are offline by looking at
> (PG_reserved && PG_offline). So I can actually tell if a page is marked
> as offline and allocated or really offline.
> 
> 
> 1. The location (not the number!) of PG_hwpoison is basically ABI and
> cannot be changed. Moving it around will most probably break dump tools.
> (see kernel/crash_core.c)

It's not ABI.  It already changed after 4.9 when PG_waiters was introduced
by commit 62906027091f.

> 2. Exposing PG_offline via kdump will make it ABI as well. And we don't
> want any complicated validity checks ("is the bit valid or not?"),
> because that would imply having to make these bits ABI as well. So
> having PG_offline just like PG_hwpoison part of page_flags is the right
> thing to do. (see patch nr 4)
> 
> 3. For determining if all pages of a section are offline (see patch nr
> 5), I will have to be able to check 1. PG_offline and 2. PG_reserved on
> any page. Will this be possible by moving e.g. PG_reserved to page
> types? (especially if some field is suddenly aliased?)

It's possible to tell whether the field is in use as mapcount or
page_types; mapcount should always be non-negative, and page_types
reserves a few bits to detect under/overflow of mapcount.  The slab/slob
users of the field will also be positive uses.

  reply	other threads:[~2018-04-22 14:02 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 13:16 [PATCH RFC 0/8] mm: online/offline 4MB chunks controlled by device driver David Hildenbrand
2018-04-13 13:16 ` [PATCH RFC 1/8] mm/memory_hotplug: Revert "mm/memory_hotplug: optimize memory hotplug" David Hildenbrand
2018-04-13 13:16   ` David Hildenbrand
2018-04-13 13:16 ` [PATCH RFC 2/8] mm: introduce PG_offline David Hildenbrand
2018-04-13 13:16   ` David Hildenbrand
2018-04-13 13:40   ` Michal Hocko
2018-04-13 13:46     ` David Hildenbrand
2018-04-17 11:50     ` David Hildenbrand
2018-04-13 17:11   ` Matthew Wilcox
2018-04-16  8:31     ` David Hildenbrand
2018-04-21 16:52     ` Vlastimil Babka
2018-04-22  3:01       ` Matthew Wilcox
2018-04-22  8:17         ` David Hildenbrand
2018-04-22 14:02           ` Matthew Wilcox [this message]
2018-04-22 15:13             ` David Hildenbrand
2018-04-29 21:08               ` Michal Hocko
2018-04-30  6:31                 ` David Hildenbrand
2018-04-20  7:30   ` David Hildenbrand
2018-04-13 13:16 ` [PATCH RFC 3/8] mm: use PG_offline in online/offlining code David Hildenbrand
2018-04-13 13:16   ` David Hildenbrand
2018-04-13 13:31 ` [PATCH RFC 4/8] kdump: expose PG_offline David Hildenbrand
2018-04-13 13:33 ` [PATCH RFC 5/8] mm: only mark section offline when all pages are offline David Hildenbrand
2018-04-13 13:33   ` David Hildenbrand
2018-04-13 13:33 ` [PATCH RFC 6/8] mm: offline_pages() is also limited by MAX_ORDER David Hildenbrand
2018-04-13 13:33   ` David Hildenbrand
2018-04-13 13:33 ` [PATCH RFC 7/8] mm: allow to control onlining/offlining of memory by a driver David Hildenbrand
2018-04-13 13:33 ` David Hildenbrand
2018-04-13 13:33   ` David Hildenbrand
2018-04-13 15:59   ` Michal Hocko
2018-04-13 15:59   ` Michal Hocko
2018-04-13 16:32     ` David Hildenbrand
2018-04-13 16:32     ` David Hildenbrand
2018-04-13 13:33 ` [PATCH RFC 8/8] mm: export more functions used to online/offline memory David Hildenbrand
2018-04-13 13:33   ` David Hildenbrand
2018-04-13 13:44 ` [PATCH RFC 0/8] mm: online/offline 4MB chunks controlled by device driver Michal Hocko
2018-04-13 14:01   ` David Hildenbrand
2018-04-13 14:20     ` Michal Hocko
2018-04-13 14:59       ` David Hildenbrand
2018-04-13 15:02   ` David Hildenbrand
2018-04-13 16:03     ` Michal Hocko
2018-04-13 16:36       ` David Hildenbrand
2018-04-13 15:59 ` Michal Hocko
2018-04-13 16:31   ` David Hildenbrand
2018-04-16 14:08     ` Michal Hocko
2018-04-16 14:48       ` David Hildenbrand
2018-04-18 15:46       ` David Hildenbrand
2018-04-19  7:33         ` Michal Hocko
2018-04-26 15:30           ` David Hildenbrand
2018-04-29 21:05             ` Michal Hocko
2018-04-30  6:24               ` 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=20180422140246.GA30714@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.levin@verizon.com \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhogan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=miles.chen@mediatek.com \
    --cc=mingo@redhat.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=riel@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vbabka@suse.cz \
    --cc=ying.huang@intel.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 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.