From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD498C433E2 for ; Wed, 2 Sep 2020 14:07:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73CCC2078E for ; Wed, 2 Sep 2020 14:07:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727945AbgIBOHT (ORCPT ); Wed, 2 Sep 2020 10:07:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:45416 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727906AbgIBNvc (ORCPT ); Wed, 2 Sep 2020 09:51:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DCFC3B609; Wed, 2 Sep 2020 13:51:31 +0000 (UTC) Date: Wed, 2 Sep 2020 15:51:30 +0200 From: Michal Hocko To: Pavel Tatashin Cc: Vlastimil Babka , Roman Gushchin , Bharata B Rao , "linux-mm@kvack.org" , Andrew Morton , Johannes Weiner , Shakeel Butt , Vladimir Davydov , "linux-kernel@vger.kernel.org" , Kernel Team , Yafang Shao , stable , Linus Torvalds , Sasha Levin , Greg Kroah-Hartman , David Hildenbrand Subject: Re: [PATCH v2 00/28] The new cgroup slab memory controller Message-ID: <20200902135130.GG4617@dhcp22.suse.cz> References: <20200127173453.2089565-1-guro@fb.com> <20200130020626.GA21973@in.ibm.com> <20200130024135.GA14994@xps.DHCP.thefacebook.com> <20200813000416.GA1592467@carbon.dhcp.thefacebook.com> <6469324e-afa2-18b4-81fb-9e96466c1bf3@suse.cz> <20200902112624.GC4617@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 02-09-20 08:51:06, Pavel Tatashin wrote: > > > > Thread #1: memory hot-remove systemd service > > > > Loops indefinitely, because if there is something still to be migrated > > > > this loop never terminates. However, this loop can be terminated via > > > > signal from systemd after timeout. > > > > __offline_pages() > > > > do { > > > > pfn = scan_movable_pages(pfn, end_pfn); > > > > # Returns 0, meaning there is nothing available to > > > > # migrate, no page is PageLRU(page) > > > > ... > > > > ret = walk_system_ram_range(start_pfn, end_pfn - start_pfn, > > > > NULL, check_pages_isolated_cb); > > > > # Returns -EBUSY, meaning there is at least one PFN that > > > > # still has to be migrated. > > > > } while (ret); > > > > Hi Micahl, > > > This shouldn't really happen. What does prevent from this to proceed? > > Did you manage to catch the specific pfn and what is it used for? > > I did. > > > start_isolate_page_range and scan_movable_pages should fail if there is > > any memory that cannot be migrated permanently. This is something that > > we should focus on when debugging. > > I was hitting this issue: > mm/memory_hotplug: drain per-cpu pages again during memory offline > https://lore.kernel.org/lkml/20200901124615.137200-1-pasha.tatashin@soleen.com I have noticed the patch but didn't have time to think it through (have been few days off and catching up with emails). Will give it a higher priority. -- Michal Hocko SUSE Labs