Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2331158iof; Wed, 8 Jun 2022 02:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwY4PNncEF+zORiV3C7tVpF3zD7nI8JvGv5c6vr9Ihl40scAx7IR8eFC5c/sJ5cGHajC0gL X-Received: by 2002:a17:902:e34b:b0:166:342f:82c6 with SMTP id p11-20020a170902e34b00b00166342f82c6mr32615636plc.29.1654681222849; Wed, 08 Jun 2022 02:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654681222; cv=none; d=google.com; s=arc-20160816; b=0Itdc9Vwdfi+c3c24tizanid5q2+D4rHyiyDhEo2GEBsomPR//DUgJpBsa+7a7d4hG SAKjozYEs4/dJiwjiKA72JVc+PJi+GBQHE1tpF3iMr/lFtaREmobxuDDzHkZPxHdBOhd 5hrwAYugdlR5SSaEIBlnCnYYTgPa3RCVYquaemEUlxt8t61pbcGpNdzWQFhWK/fCoI0Y hsrMf+xyORTmKhcHkI45B1ekly+tQc9pkRwdODyfi1nmzC6NpbBYcfDAcwkufszkMHf6 PAs4vQ0L0qTk6J3utzbNAR+29nbFDYLkSQ2045Dh9Cf2dYNBUmM2Vps4/OXoH0YO9HtA 38KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=xAEax7ipo4Jhnm9nPIQFTACDB/TiXdXUmpev3kTtq3E=; b=Ba1qGvPUoHkNuFjypRydzNLT9JIq79Fvfnygs9KxagBkZpR5OgDvvPdAY6jXPyTRMq hLjpXc191fPV7FWAe5nm+v8m+HJLiBVMLzC2Jy21HhujSFWshD1n3RxqwaiWyvlr7Dqq Z3LtygW4jR4Jcw3mC1kjkVDjgiavoOBXT7rOg0iXNAiH9yj+tgfMdO77SujfF1JalyQk weWBbGAqQlZRKJ+8/8FMBgqKCG8+dXTJXOEb4ji8U9zorMlVWNlORIvOMIRdbESNXnhl sxFBFfztHggg1IEocb4veA8CXPV4HJvQ4P5JkG9r7T36J/JNPMZnGwnB6hjzvtwVOdfO 8jsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SbqT+dC8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y20-20020a626414000000b005183283a2dcsi25245187pfb.59.2022.06.08.02.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 02:40:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SbqT+dC8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 13EB81CAC20; Wed, 8 Jun 2022 02:12:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234207AbiFHJKq (ORCPT + 99 others); Wed, 8 Jun 2022 05:10:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234029AbiFHJJZ (ORCPT ); Wed, 8 Jun 2022 05:09:25 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E93FDFC836 for ; Wed, 8 Jun 2022 01:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654676886; x=1686212886; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=8K6LeNsRWmnLejKyvvzLEzNHPs1j7CKcbVI/K2R0Ois=; b=SbqT+dC8JUTAzl61PFw0c87HhFXMytLdtq1eVO2I7EgGtTNQvgYxU6tg 95C/dBffrEOkTPpCo+rpVkvMLrcU/UFKUwPfJjxBT6lEo1OlUAhBF5P5Z KayUUA7jnXnI7YBTn5+/R9a3DVEXlFbMpkm48qDu65upP6EKNNEUSfYYr XzlSq3PEMUxAImgil5f3n0wThgHRCa1QkQQsINahjLZuJqowfdbI2v/kQ POC3aj9pDQlJL8L9SsVtvm1cnUmDdXlP5akFwVqv7PGx0ZRD/YMUHSbYF 5rcCJF9c4NuMArQ+PML3Vd7Auxnc3kBqYeUPBhMVXGAZWXLvxTsplOqJd Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10371"; a="274340315" X-IronPort-AV: E=Sophos;i="5.91,285,1647327600"; d="scan'208";a="274340315" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 01:28:06 -0700 X-IronPort-AV: E=Sophos;i="5.91,285,1647327600"; d="scan'208";a="723742180" Received: from xding11-mobl.ccr.corp.intel.com ([10.254.214.239]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 01:28:02 -0700 Message-ID: <13a58454fc2512242d5ff69e9067afc926c3b563.camel@intel.com> Subject: Re: [RFC PATCH v4 1/7] mm/demotion: Add support for explicit memory tiers From: Ying Huang To: Aneesh Kumar K V , linux-mm@kvack.org, akpm@linux-foundation.org Cc: Greg Thelen , Yang Shi , Davidlohr Bueso , Tim C Chen , Brice Goglin , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Feng Tang , Jagdish Gediya , Baolin Wang , David Rientjes Date: Wed, 08 Jun 2022 16:27:59 +0800 In-Reply-To: References: <20220527122528.129445-1-aneesh.kumar@linux.ibm.com> <20220527122528.129445-2-aneesh.kumar@linux.ibm.com> <604403db000ced33f997688ce82eaa43ed6c8bbe.camel@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2022-06-08 at 13:54 +0530, Aneesh Kumar K V wrote: > On 6/8/22 12:46 PM, Ying Huang wrote: > > On Fri, 2022-05-27 at 17:55 +0530, Aneesh Kumar K.V wrote: > > > > [snip] > > > > > > > > +static int __init memory_tier_init(void) > > > +{ > > > + int ret; > > > + > > > + ret = subsys_system_register(&memory_tier_subsys, memory_tier_attr_groups); > > > + if (ret) > > > + panic("%s() failed to register subsystem: %d\n", __func__, ret); > > > > I don't think we should go panic for failing to register subsys and > > device for memory tiers. Just pr_err() should be enough. > > > > So you are suggesting we continue to work with memory tiers with no > userspace interface? Yes. We don't need to panic system for this. Best Regards, Huang, Ying > > > + > > > + /* > > > + * Register only default memory tier to hide all empty > > > + * memory tier from sysfs. > > > + */ > > > + ret = register_memory_tier(DEFAULT_MEMORY_TIER); > > > + if (ret) > > > + panic("%s() failed to register memory tier: %d\n", __func__, ret); > > > + > > > + /* > > > + * CPU only nodes are not part of memoty tiers. > > > + */ > > > + memory_tiers[DEFAULT_MEMORY_TIER]->nodelist = node_states[N_MEMORY]; > > > + > > > + return 0; > > > +} > > > +subsys_initcall(memory_tier_init); > > > + > > > +#endif /* CONFIG_TIERED_MEMORY */ > > > > >