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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 834C8CCA47B for ; Wed, 8 Jun 2022 07:51:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230072AbiFHHvr (ORCPT ); Wed, 8 Jun 2022 03:51:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232296AbiFHHvO (ORCPT ); Wed, 8 Jun 2022 03:51:14 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97F502BF7 for ; Wed, 8 Jun 2022 00:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654672614; x=1686208614; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=KlqO8nPRQRaOPy3EhxLg2Le/QPz9uVGA3SU1z+o5YCI=; b=R7ihEf5hCyhV+CxQqJILWydjXb13ci3XgcZAhKVRHuBprBUqWfZyDnKK 7n+6VnQKB8YgI1WiXpB3k52NyH8y60imoXLiDPNO4xrQnGCR7IozxBDQb LoBEw98X/qTKiuQZ5G5l8HvnxkhBBuhWAx5jNnHaKUvqMhxgCnQDTTpxB fJSv9GxtO2NVhmomebEbhltSouzsNXedlZC71/mUtgSXOPp1+0XP6hP47 BiZt8X0/jvLyWVQfhhB2k2ZHNIOY985mfPstdcMVy8oPJiZ8teFThURri 9lTshDaBzn5R7GLUKw4hl1qg+b24zAxLaqIZKXOPZFXiNpphCTDOInVld Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10371"; a="257237974" X-IronPort-AV: E=Sophos;i="5.91,285,1647327600"; d="scan'208";a="257237974" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 00:16:54 -0700 X-IronPort-AV: E=Sophos;i="5.91,285,1647327600"; d="scan'208";a="636631905" Received: from xding11-mobl.ccr.corp.intel.com ([10.254.214.239]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 00:16:48 -0700 Message-ID: <604403db000ced33f997688ce82eaa43ed6c8bbe.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 15:16:46 +0800 In-Reply-To: <20220527122528.129445-2-aneesh.kumar@linux.ibm.com> References: <20220527122528.129445-1-aneesh.kumar@linux.ibm.com> <20220527122528.129445-2-aneesh.kumar@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 */