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 D44ABECAAA2 for ; Fri, 26 Aug 2022 00:26:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 319676B0074; Thu, 25 Aug 2022 20:26:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2C9A4940007; Thu, 25 Aug 2022 20:26:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1901E6B0078; Thu, 25 Aug 2022 20:26:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 071296B0074 for ; Thu, 25 Aug 2022 20:26:01 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D0AF81A039D for ; Fri, 26 Aug 2022 00:26:00 +0000 (UTC) X-FDA: 79839851280.10.034A32A Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by imf07.hostedemail.com (Postfix) with ESMTP id BA9BB40003 for ; Fri, 26 Aug 2022 00:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661473559; x=1693009559; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=XLkLlYDs/lYdRBUE65t1WNh/ERtN5czrzdjpPe9X9h0=; b=bDjQ1CNdpihS3jfDSihKzmv2kHtlgHlDnI2kT4yNk2PxkVadlHMkd8la B8yu6bRGzBdNhdqbKOXeKak1BL8LFelArUPCZmbXUEmMneFvcKiMOX6vl AgZi4hyXVHdAbBjnf/0WFQ8n5Dl4ZIPyLr/6alOiCm+Wpr6bLEKqUnBA3 3b9ucNoyygxqb5WFKlLeooJZdjAjhkBoJz4LitjTyB9ujeuU/usi2pdoe McUeraOp05+zq/lT6Zeqak2RL4h5kDpEl5yAJmLgYBXcGtxrfy9PGYPxD YGblHM9kBRI3kKK93JOFoQrYecXKOvTryodDmHRUi4gvMeSLcOucwPAm2 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="356105813" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="356105813" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 17:25:58 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="587100037" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 17:25:53 -0700 From: "Huang, Ying" To: Aneesh Kumar K V Cc: David Hildenbrand , linux-mm@kvack.org, akpm@linux-foundation.org, Wei Xu , Yang Shi , Davidlohr Bueso , Tim C Chen , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Johannes Weiner , jvgediya.oss@gmail.com, Bharata B Rao Subject: Re: [PATCH] mm/demotion: Fix kernel error with memory hotplug References: <20220825092019.379069-1-aneesh.kumar@linux.ibm.com> <0602b3b4-214f-94b1-61fe-2b2528ff529b@redhat.com> <5b0d911b-4cc2-f1ae-b33b-79aca6e3124c@linux.ibm.com> Date: Fri, 26 Aug 2022 08:25:42 +0800 In-Reply-To: <5b0d911b-4cc2-f1ae-b33b-79aca6e3124c@linux.ibm.com> (Aneesh Kumar K. V.'s message of "Thu, 25 Aug 2022 18:23:59 +0530") Message-ID: <87k06v3l6h.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661473560; a=rsa-sha256; cv=none; b=dZMhQekAGqCm1WkmCwYU3LUm0d7KTisxp11e6Q5lu4wq5sUMADfNbwXOzkoTLyctXWyDhJ uW+fKvrKzkCGNuKcu3hbspidB6YFYA96JEOeWOnATwzPgij5OK/ApoWFLMMNWTyhvgnYeg F1vFFNQXVLZy900mRPbKwSfg1rpV8Zc= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=bDjQ1CNd; spf=pass (imf07.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661473560; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0l4Ws4r/++YMxklKERpJyQRl0vuR8BIHgIzbqPCfb5M=; b=O3nCQ2L6uAF2YXLKTPQt1bxnPtktpbf0FlF17H4+A9VxkGuekKJZOh3JrBoOoPe9tb/+AI xW+pS4073Ua6bx++u9QdSdROm37rRmZRqTyTZ4YSqXgEvh8ERmp+BLRsmukG7d47pU8DXa ynG3kqYeBnjiK17rW54cjhlpvhptU8Y= X-Stat-Signature: n3ju47s56afmx3z1ybfucxy5kfya4xbf X-Rspamd-Queue-Id: BA9BB40003 X-Rspam-User: X-Rspamd-Server: rspam06 Authentication-Results: imf07.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=bDjQ1CNd; spf=pass (imf07.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-HE-Tag: 1661473559-603279 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Aneesh Kumar K V writes: > On 8/25/22 5:46 PM, David Hildenbrand wrote: >> On 25.08.22 11:20, Aneesh Kumar K.V wrote: >>> On memory hot unplug, the kernel removes the node memory type >>> from the associated memory tier. Use list_del_init instead of >>> list del such that the same memory type can be added back >>> to a memory tier on hotplug. >>> >>> Without this, we get the below warning and return error on >>> adding memory type to a new memory tier. >>> >>> [ 33.596095] ------------[ cut here ]------------ >>> [ 33.596099] WARNING: CPU: 3 PID: 667 at mm/memory-tiers.c:115 set_node_memory_tier+0xd6/0x2e0 >>> [ 33.596109] Modules linked in: kmem >>> >>> ... >>> >>> [ 33.596126] RIP: 0010:set_node_memory_tier+0xd6/0x2e0 >>> >>> .... >>> [ 33.596196] memtier_hotplug_callback+0x48/0x68 >>> [ 33.596204] blocking_notifier_call_chain+0x80/0xc0 >>> [ 33.596211] online_pages+0x25e/0x280 >>> [ 33.596218] memory_block_change_state+0x176/0x1f0 >>> [ 33.596225] memory_subsys_online+0x37/0x40 >>> [ 33.596230] online_store+0x9b/0x130 >>> [ 33.596236] kernfs_fop_write_iter+0x128/0x1b0 >>> [ 33.596242] vfs_write+0x24b/0x2c0 >>> [ 33.596249] ksys_write+0x74/0xe0 >>> [ 33.596254] do_syscall_64+0x43/0x90 >>> [ 33.596259] entry_SYSCALL_64_after_hwframe+0x63/0xcd >>> >>> Fixes: mm/demotion: Add hotplug callbacks to handle new numa node onlined >> >> Do we have a proper 12-digit commit id as well? >> >> Do we have to cc stable? >> > > That patch is not yet merged upstream. It is in mm-unstable. I guess Andrew can fold the change > into the original patch? I think it may better to reply the original patch and name this patch as fix, for example, mm/demotion: Add hotplug callbacks to handle new numa node onlined fix I found Andrew uses this kind of name before for fixing. Best Regards, Huang, Ying