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 5D1EFECAAA1 for ; Fri, 2 Sep 2022 06:12:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C473A800B9; Fri, 2 Sep 2022 02:12:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF5E08008D; Fri, 2 Sep 2022 02:12:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ABD20800B9; Fri, 2 Sep 2022 02:12:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9E59B8008D for ; Fri, 2 Sep 2022 02:12:12 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 74F09C0CA7 for ; Fri, 2 Sep 2022 06:12:12 +0000 (UTC) X-FDA: 79866125304.10.F7227AF Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf28.hostedemail.com (Postfix) with ESMTP id 66DBCC0072 for ; Fri, 2 Sep 2022 06:12:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662099131; x=1693635131; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=V1LrsReCOZOn0uyOPVtRtxNfCUOuD4F2LfutTySDfRs=; b=gGzCOyWT3OYOmRokNC/xxAPG4XamRNlAGx7vcVoOl441uQW9WESdsww2 mYUwty6PfNOa3RHjBc7L5GkuXCuFfdaAnW0QfwZsljkMcRKj7xNs5i+Kg VVaViHcgOwWEYJJmZqkFShTjrkmS1+y03BtS/bxDjzEKGXu88ySRlFgJk 8zz6d6N60eHhA7Nb/trQYF16jS5iRvMoZk5GRYbfwqUaFwZOv51D5nLHT zExpMKgIVYMBn7w4KYk2xHT9I4t796j9JBRU0o4LaMLpYqdUwajZ3uPQT FgkNRvKMiV5oTa7ah6PYGmqoR/XD7+dO4xAt+wUTWdwMkHu3W4iDUBKMM Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10457"; a="276305441" X-IronPort-AV: E=Sophos;i="5.93,283,1654585200"; d="scan'208";a="276305441" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2022 23:12:09 -0700 X-IronPort-AV: E=Sophos;i="5.93,283,1654585200"; d="scan'208";a="563850475" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2022 23:12:04 -0700 From: "Huang, Ying" To: Aneesh Kumar K V Cc: Wei Xu , Johannes Weiner , Linux MM , Andrew Morton , Yang Shi , Davidlohr Bueso , Tim C Chen , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , jvgediya.oss@gmail.com, Bharata B Rao , Greg Thelen Subject: Re: [PATCH v3 updated] mm/demotion: Expose memory tier details via sysfs References: <20220830081736.119281-1-aneesh.kumar@linux.ibm.com> <87tu5rzigc.fsf@yhuang6-desk2.ccr.corp.intel.com> <87pmgezkhp.fsf@yhuang6-desk2.ccr.corp.intel.com> <87fshaz63h.fsf@yhuang6-desk2.ccr.corp.intel.com> <698120ce-d4df-3d13-dea9-a8f5c298783c@linux.ibm.com> Date: Fri, 02 Sep 2022 14:12:02 +0800 In-Reply-To: <698120ce-d4df-3d13-dea9-a8f5c298783c@linux.ibm.com> (Aneesh Kumar K. V.'s message of "Fri, 2 Sep 2022 11:16:14 +0530") Message-ID: <87bkryz4nh.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=1662099132; a=rsa-sha256; cv=none; b=R5gyZCAlPIkVGQWdnhAwAtiSF8n43DYVw/3+mX9jJvQSxTR4g7w7rpG36Cx0y79omR0UBS HflFl9NcAmfG3zS+lyIP/+XaWqnQV9Ita4hq0BTyyftNAtCxCEJUfaT2NnZDyvXah8rV4i dC67pgblWkk9sODo6X+fZ0igGMZxP14= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=gGzCOyWT; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf28.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662099132; 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=bI9/qpQSWvAxlJk44sYrFD7MdDjeq4/88bFCXbrf3VY=; b=t9t9ICusXydWTSY+imI3WAehQRkEi4w1mn3LeiQPtA5mIDXkAwutuKfi/cIt9m2k0PtyJb 6TAadfMmz+y8I+B+Wx7S+itdzn+ZPd+F5vTPo94C/+yxBqNUxfK7xNvuuG3fLvlk188c54 rAJLtWaHgsYJZ5uw1wS6iVWJCyl1ieQ= X-Stat-Signature: 9dqr3da8d3ox6nw4d1ncwqcas8chgjyr X-Rspamd-Queue-Id: 66DBCC0072 X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=gGzCOyWT; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf28.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=ying.huang@intel.com X-Rspamd-Server: rspam08 X-HE-Tag: 1662099131-950952 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 9/2/22 11:10 AM, Huang, Ying wrote: >> Aneesh Kumar K V writes: >> >>> On 9/2/22 10:39 AM, Wei Xu wrote: >>>> On Thu, Sep 1, 2022 at 5:33 PM Huang, Ying wrote: >>>>> >>>>> Aneesh Kumar K V writes: >>>>> >>>>>> On 9/1/22 12:31 PM, Huang, Ying wrote: >>>>>>> "Aneesh Kumar K.V" writes: >>>>>>> >>>>>>>> This patch adds /sys/devices/virtual/memory_tiering/ where all memory tier >>>>>>>> related details can be found. All allocated memory tiers will be listed >>>>>>>> there as /sys/devices/virtual/memory_tiering/memory_tierN/ >>>>>>>> >>>>>>>> The nodes which are part of a specific memory tier can be listed via >>>>>>>> /sys/devices/virtual/memory_tiering/memory_tierN/nodes >>>>>>> >>>>>>> I think "memory_tier" is a better subsystem/bus name than >>>>>>> memory_tiering. Because we have a set of memory_tierN devices inside. >>>>>>> "memory_tier" sounds more natural. I know this is subjective, just my >>>>>>> preference. >>>>>>> >>> >>> >>> I missed replying to this earlier. I will keep memory_tiering as subsystem name in v4 >>> because we would want it to a susbsystem where all memory tiering related details can be found >>> including memory type in the future. This is as per discussion >>> >>> https://lore.kernel.org/linux-mm/CAAPL-u9TKbHGztAF=r-io3gkX7gorUunS2UfstudCWuihrA=0g@mail.gmail.com >> >> I don't think that it's a good idea to mix 2 types of devices in one >> subsystem (bus). If my understanding were correct, that breaks the >> driver core convention. >> > > All these are virtual devices .I am not sure i follow what you mean by 2 types of devices. > memory_tiering is a subsystem that represents all the details w.r.t memory tiering. It shows > details of memory tiers and can possibly contain details of different memory types . IMHO, memory_tier and memory_type are 2 kind of devices. They have almost totally different attributes (sysfs file). So, we should create 2 buses for them. Each has its own attribute group. "virtual" itself isn't a subsystem. Best Regards, Huang, Ying