From: David Hildenbrand <david@redhat.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH RFC 0/8] mm: online/offline 4MB chunks controlled by device driver
Date: Mon, 30 Apr 2018 08:24:31 +0200 [thread overview]
Message-ID: <e980bd68-8864-65e3-0dcd-6c5739cd5e4f@redhat.com> (raw)
In-Reply-To: <20180429210523.GA26305@dhcp22.suse.cz>
On 29.04.2018 23:05, Michal Hocko wrote:
> On Thu 26-04-18 17:30:47, David Hildenbrand wrote:
>> On 19.04.2018 09:33, Michal Hocko wrote:
>>> On Wed 18-04-18 17:46:25, David Hildenbrand wrote:
>>> [...]
>>>> BTW I was able to easily produce the case where do_migrate_range() would
>>>> loop for ever (well at least for multiple minutes, but I assume this
>>>> would have went on :) )
>>>
>>> I am definitely interested to hear details.
>>>
>>
>> migrate_pages() seems to be returning > 0 all the time. Seems to come
>> from too many -EAGAIN from unmap_and_move().
>>
>> This in return (did not go further down that road) can be as simple as
>> trylock_page() failing.
>
> Yes but we assume that nobody holds the lock for ever so sooner or later
> we should be able to get the lock.
>
>> Of course, we could have other permanent errors here (-ENOMEM).
>> __offline_pages() ignores all errors coming from do_migrate_range(). So
>> in theory, this can take forever - at least not what I want for my use
>> case. I want it to fail fast. "if this block cannot be offlined, try
>> another one".
>>
>> I wonder if it is the right thing to do in __offline_pages() to ignore
>> even permanent errors. Anyhow, I think I'll need some way of telling
>> offline_pages "please don't retry forever".
>
> Well, it would be really great to find a way to distinguish permanent
> errors from temporary ones. But I am not sure this is very easy. Anyway,
> we should be only looking at migratable pages at this stage of the
> offline so the migration should eventually succeed. We have a bug if
> this is not a case and we should address it. Find the page which fails
> to migrate and see who keeps us from migrating it. This might be a page
> pin abuser or something else. That is why I've said I am interested in
> details.
>
Yes, I am definitely planning to look into the details (because for my
work it implies needlessly trying to offline pages, which is overhead).
For now I think - even having that sorted out - that I'll need a way to
tell offline_pages() to fail fast (as you mentioned: distinguishing
permanent from temporary errors might not be easy).
offline_pages() is historically only triggered by the user, who can
simply decide to stop (-EINTR) if it takes to long.
Let's discuss with the next RFC.
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2018-04-30 6:24 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-13 13:16 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 ` [PATCH RFC 2/8] mm: introduce PG_offline 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
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: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 ` [PATCH RFC 6/8] mm: offline_pages() is also limited by MAX_ORDER 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 15:59 ` Michal Hocko
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: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 [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=e980bd68-8864-65e3-0dcd-6c5739cd5e4f@redhat.com \
--to=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@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