Re: [PATCH 3/4] writeback: nr_dirtied and nr_cleaned in /proc/vmstat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 28, 2010 at 4:50 PM, Wu Fengguang <fengguang.wu@xxxxxxxxx> wrote:
> It's silly to have the different names nr_dirtied and pages_cleaned
> for the same item.

I agree. Will fix.

> The output format is quite different from /proc/vmstat.
> Do we really need to "Node X", ":" and "times" decorations?

Node X is based on the meminfo file but I agree it's redundant information.

> And the "_PAGES" in NR_FILE_PAGES_DIRTIED looks redundant to
> the "_page" in node_page_state(). It's a bit long to be a pleasant
> name. NR_FILE_DIRTIED/NR_CLEANED looks nicer.

Yeah. Will fix.


>> +static SYSDEV_ATTR(vmstat, S_IRUGO, node_read_vmstat, NULL);
>> +
>>  static ssize_t node_read_distance(struct sys_device * dev,
>>                       struct sysdev_attribute *attr, char * buf)
>>  {
>> @@ -243,6 +255,7 @@ int register_node(struct node *node, int num, struct node *parent)
>>               sysdev_create_file(&node->sysdev, &attr_meminfo);
>>               sysdev_create_file(&node->sysdev, &attr_numastat);
>>               sysdev_create_file(&node->sysdev, &attr_distance);
>> +             sysdev_create_file(&node->sysdev, &attr_vmstat);
>>
>>               scan_unevictable_register_node(node);
>>
>> @@ -267,6 +280,7 @@ void unregister_node(struct node *node)
>>       sysdev_remove_file(&node->sysdev, &attr_meminfo);
>>       sysdev_remove_file(&node->sysdev, &attr_numastat);
>>       sysdev_remove_file(&node->sysdev, &attr_distance);
>> +     sysdev_remove_file(&node->sysdev, &attr_vmstat);
>>
>>       scan_unevictable_unregister_node(node);
>>       hugetlb_unregister_node(node);          /* no-op, if memoryless node */
>> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
>> index 6e6e626..d42f179 100644
>> --- a/include/linux/mmzone.h
>> +++ b/include/linux/mmzone.h
>> @@ -104,6 +104,8 @@ enum zone_stat_item {
>>       NR_ISOLATED_ANON,       /* Temporary isolated pages from anon lru */
>>       NR_ISOLATED_FILE,       /* Temporary isolated pages from file lru */
>>       NR_SHMEM,               /* shmem pages (included tmpfs/GEM pages) */
>> +     NR_FILE_PAGES_DIRTIED,  /* number of times pages get dirtied */
>> +     NR_PAGES_CLEANED,       /* number of times pages enter writeback */
>
> How about the comments /* accumulated number of pages ... */?

OK.
May not get patch out today but will incorporate these fixes. Thank you again.

mrubin

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]