Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2294702iof; Wed, 8 Jun 2022 01:42:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz75ki6NWdNJRx7wBFZboqGNPZ8csilglH8Ay4EgdyZl1TYPCvjZhbWwE0zZcH+qGtS4+SZ X-Received: by 2002:a17:90b:4a12:b0:1e8:4a16:ae28 with SMTP id kk18-20020a17090b4a1200b001e84a16ae28mr25740749pjb.1.1654677729828; Wed, 08 Jun 2022 01:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654677729; cv=none; d=google.com; s=arc-20160816; b=T9Lr6kEw3+6aNv8r02S6uL2djLEI+RYtZ/zr6ioI3RuUokefYByMdJDKde3qSZLtwt WKFgmew4scxr0tFx5I2svicn8ToTm6lO8S16pVr+ZZ2STYPnIUvUWQLH3H/BP+8b0TnJ klQ0sO91fw4AHJbk1g4NXQ0jHvlRhe3tbNAnyxbiXAURMMqTzNsmVYqLY+fn6QmQdi9C F8P8OzHb9OYfKpSK1TdlofYKpnJDS9MZ+nD92FUoA4Ru/XtyRn6Rhwx8ilrcaokz2PN8 YszHRvMFSxz5u3OI0MLgVjcs/sDIisS9R5D/AJ/rWel0paKS0jSVMoR+6oPNawB4cjAz MSmg== 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=m7cbXRy23W/f82v90mu9i5m5ZdCFjySD3CaJtci6GkI=; b=fnEYQGl/vTYpYD6ju/ModDQNsSX+c4E7VnK9KHgZlD219HR1utG4BWbuzaCPF4fbot t0z4Qza4BbVxTt3iamMgafpIuUNgpySVYdCIXD5QBDs2Au5JgG34CWYl3V/M1w1wIO2J 0Le8f2tg51NmoGNNxVhNOczPolPpc9lH68mWe3KqX0Nihl+Zeu7TdkHZ2fOwMKoYLMuU 2JosLoiiDLpAs6czlvZ4561PplAoB0ObhOL13X1hk88nQ3r+HflyGlWWaH1cAV3QeE1u Hwz6tn8q55D73xm2qnsmBaYprxAxVuuxc+5xy50R5MWei+z94Sfi6eJQXvfJHoHVlobZ o8OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=R7ihEf5h; 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 be5-20020a170902aa0500b00153b2d16545si25572589plb.333.2022.06.08.01.42.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:42:09 -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=R7ihEf5h; 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 6994131D0F2; Wed, 8 Jun 2022 01:07:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230105AbiFHHvm (ORCPT + 99 others); Wed, 8 Jun 2022 03:51:42 -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 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 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 */