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 5B337ECAAD5 for ; Sat, 27 Aug 2022 03:00:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DFE806B0074; Fri, 26 Aug 2022 23:00:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D87DE940008; Fri, 26 Aug 2022 23:00:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C29C5940007; Fri, 26 Aug 2022 23:00:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B10996B0074 for ; Fri, 26 Aug 2022 23:00:55 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 8D28D80397 for ; Sat, 27 Aug 2022 03:00:55 +0000 (UTC) X-FDA: 79843870470.05.A5F8CF4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf10.hostedemail.com (Postfix) with ESMTP id 3EFDEC001E for ; Sat, 27 Aug 2022 03:00:55 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 408B161DC6; Sat, 27 Aug 2022 03:00:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15B83C433C1; Sat, 27 Aug 2022 03:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1661569253; bh=HwbmXGwd0AgLMJiljlT4VpV8BfzBKXe5wxIb0yWwk7E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SUIjL/wZO/DBoL+mByaxSH6RYV+RbNxSjDcUo3KPkX1NzxhJEi8MdKPBjpr3bN0q9 /SFfL4ylvPWqEHhXnvk8QHib3174Iee53+WiSw5+twzXQ4EGKQOwcQGw9lnXVNLiqM dieaNrYJmQzdng4V+MS7DIo96UXd1G4eNVSIch0o= Date: Fri, 26 Aug 2022 20:00:52 -0700 From: Andrew Morton To: "Aneesh Kumar K.V" Cc: linux-mm@kvack.org, Wei Xu , Huang Ying , 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-unstable] mm/demotion: Assign correct memory type for multiple dax devices with the same node affinity Message-Id: <20220826200052.03c4e1dca09948aec4cbc311@linux-foundation.org> In-Reply-To: <20220826100224.542312-1-aneesh.kumar@linux.ibm.com> References: <20220826100224.542312-1-aneesh.kumar@linux.ibm.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661569255; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9cJTtqq44bzaisJV+IO9o4Nzn5yoTUkrs8+47Ppzf0g=; b=wd4dGfdc0/iiw6/KtGPAze5anh0VOMQfLN6yPAOdMqcVvc64KrzAlbJdy/wTOyNQz6JTDR Kv3+RUGLPPnAQc2SoXfvfUhSfwy45jPwTlK0R2dU85bhiBbA+yqcl57JIp9iBB2ID1LtdC WCyVud+XNdhjyNS5XI1BGapyB1FWcwo= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="SUIjL/wZ"; spf=pass (imf10.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661569255; a=rsa-sha256; cv=none; b=p03uZDKAq0KwXY1wM++FDgEjlYVipxCaF0OiglIi8w5XZ38snkbopABqYXPI8HenMK9kR3 IAIBhulpjx2PRzPGxWD3HZNTPHDXMkvKjPLTrCsTAfFfPOQTtoblAkNl8NUv6Yw84Fyas1 M4ABsNHs9fQm9qp4TbdQF/KaXzT0TZk= X-Rspam-User: Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="SUIjL/wZ"; spf=pass (imf10.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam05 X-Stat-Signature: c8curwggazpngue44p4wz7zttxmcynzp X-Rspamd-Queue-Id: 3EFDEC001E X-HE-Tag: 1661569255-392073 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: On Fri, 26 Aug 2022 15:32:24 +0530 "Aneesh Kumar K.V" wrote: > With multiple dax devices having the same node affinity, the kernel wrongly assigned > default_dram memory type to some devices after the memory hotplug operation. Fix this by > not clearing node_memory_types on the dax device remove. > > The current kernel cleared node_memory_type on successful removal of a dax device. > But then we can have multiple dax devices with the same node affinity. Clearing the > node_memory_type results in assigning other dax devices to the default dram type when > we bring them online. Thanks, I added this as a fix against "mm/demotion/dax/kmem: set node's abstract distance to MEMTIER_DEFAULT_DAX_ADISTANCE". Reworked this patch to apply, reworked all the subsequent patches as a result of applying that, checked that this patch as-sent cleanly reverts when all are applied, checked that everything compiled at each step of the resulting series.