lkml.org 
[lkml]   [2022]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH v4 1/7] mm/demotion: Add support for explicit memory tiers
From
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?

>> +
>> + /*
>> + * 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 */
>
>

\
 
 \ /
  Last update: 2022-06-08 11:12    [W:1.090 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site