----- Original Message -----
> From: "Caspar Zhang" <[email protected]>
> To: "Zhouping Liu" <[email protected]>
> Cc: "LTP List" <[email protected]>
> Sent: Monday, May 13, 2013 3:57:11 PM
> Subject: Re: [LTP] [PATCH 1/3] mm/ksm: set the merge_across_nodes knob before
> testing
>
> On 05/10/2013 05:13 PM, Zhouping Liu wrote:
> > + /*
> > + * Save the current value of merge_across_nodes knob,
> > + * and make it perform as the default behavior.
> > + */
>
> This comment is unnecessary. it's not difficult to know it's a
> save/recover operation. I think you can remove it or give a short
> comment of where does this new sysfile come from (e.g. kernel ver/commit
> id, etc)
OK, as merge_across_nodes is new for us, I think we should give some useful
comments, so I updated the comment like below:
+ /*
+ * kernel commit 90bd6fd introduced a new KSM sysfs knob
+ * /sys/kernel/mm/ksm/merge_across_nodes, setting it to '0'
+ * will prevent KSM pages being merged across numa nodes,
+ * which will cause the case fail, so we need to make sure
+ * it is enabled before testing.
+ */
+ if (access(PATH_KSM "merge_across_nodes", F_OK) == 0) {
+ SAFE_FILE_SCANF(NULL, PATH_KSM "merge_across_nodes",
+ "%d", &merge_across_nodes);
+ SAFE_FILE_PRINTF(NULL, PATH_KSM "merge_across_nodes", "1");
+ }
+
and the comment message only appear once in ksm01.c, removed it from
ksm0[2|3|4].c.
please review V2.
--
Thanks,
Zhouping
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list