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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 141B0C433F5 for ; Sun, 13 Feb 2022 11:07:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1883C6B0072; Sun, 13 Feb 2022 06:07:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1378E6B0073; Sun, 13 Feb 2022 06:07:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 04E396B0078; Sun, 13 Feb 2022 06:07:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0134.hostedemail.com [216.40.44.134]) by kanga.kvack.org (Postfix) with ESMTP id EBF096B0072 for ; Sun, 13 Feb 2022 06:07:10 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 767C6180A5979 for ; Sun, 13 Feb 2022 11:07:10 +0000 (UTC) X-FDA: 79137479820.21.6D17151 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf19.hostedemail.com (Postfix) with ESMTP id 6F1DC1A0009 for ; Sun, 13 Feb 2022 11:07:08 +0000 (UTC) Received: from dggpeml500021.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JxPfc2bbrzbhrt for ; Sun, 13 Feb 2022 19:06:00 +0800 (CST) Received: from dggpeml100016.china.huawei.com (7.185.36.216) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Sun, 13 Feb 2022 19:07:04 +0800 Received: from huawei.com (10.174.179.133) by dggpeml100016.china.huawei.com (7.185.36.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Sun, 13 Feb 2022 19:07:04 +0800 From: Yang Yanchao To: CC: , Subject: The process hangs during memory-hotplug. Date: Sun, 13 Feb 2022 19:07:03 +0800 Message-ID: <20220213110703.2008-1-yangyanchao6@huawei.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-Originating-IP: [10.174.179.133] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml100016.china.huawei.com (7.185.36.216) X-CFilter-Loop: Reflected Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf19.hostedemail.com: domain of yangyanchao6@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=yangyanchao6@huawei.com X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 6F1DC1A0009 X-Stat-Signature: ps15sk5dytmma9zedyi1y84ero7gxeip X-HE-Tag: 1644750428-923768 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000466, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hello,=0D =0D I find a hanging issue during memory-hotplug on kernel-4.18.=0D Repetition steps:=0D 1. malloc for all system memory, write 'x', then free=0D 2. for each removable memory block:=0D echo offline > /sys/devices/system/memory/memoryXXX/state=0D Then during the offline process, there is a high probability of being stuck= for more than 20 minutes to five hours.=0D cat /sys/ Device/system/Memory/memoryXXX/state=0D The status is "going-offline"=0D I try to understand it by adding some print to the kernel.The discovery pro= cess can't exit in this loop:=0D __offline_pages=0D do_migrate_range=0D migrate_pages=0D unmap_and_move=0D move_to_new_page=0D fallback_migrate_page --> return EAGAIN=0D I try to clear the cache, but it don't seems to solve the problem.=0D echo 3 > /proc/sys/vm/drop_caches=0D Can I fix this problem with other Settings? Or can I see why it's stuck?=0D System configuration information:=0D Use physical machines instead of virtual machines=0D [root@localhost ~]# free -h=0D total used free shared buff/cache avail= able=0D Mem: 502Gi 201Gi 300Gi 10Mi 172Mi 2= 99Gi=0D Swap: 4.0Gi 0B 4.0Gi=0D [root@localhost ~]# uname -i=0D x86_64=0D =0D Regards,=0D Yang Yanchao=