[LTP] [PATCH v9 1/2] cpuset02: Convert the test6 from cpuset_memory_testset.sh to C code

Wei Gao wegao@suse.com
Mon Mar 31 08:13:02 CEST 2025


On Mon, Mar 31, 2025 at 01:05:38PM +0800, Li Wang wrote:
> On Mon, Mar 31, 2025 at 11:20 AM Wei Gao <wegao@suse.com> wrote:
> 
> > Improvements compare with test6 shell test:
> > * Remove /bin/echo $load_balance > $path/cpuset.sched_load_balance
> > since test focus on verify huge page is really allocated in the correct
> > node, task no need bind to specific cpuset.
> > * Directly keep 1 hpage reserved in each node otherwise test case has
> > chance to fail, since `echo 1 > /proc/sys/vm/nr_hugepages` will try to
> > reserve 1 pages from a NUMA node randomly.
> >
> > Signed-off-by: Wei Gao <wegao@suse.com>
> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > Suggested-by: Li Wang <liwang@redhat.com>
> >
> 
> Reviewed-by: Li Wang <liwang@redhat.com>
> 
> 
> > +static void child(void)
> > +{
> > +       char *p;
> > +       int fd_hugepage;
> > +
> > +       fd_hugepage = SAFE_OPEN(HUGE_PAGE_FILE, O_CREAT | O_RDWR, 0755);
> >
> 
> 
> > +TST_EXP_PASS_SILENT(system("cat /proc/meminfo"));
> >
> 
> This line is for debugging purposes, I guess, and it should be removed in
> the formal patch.
Sorry, forget remove this debug line after done different scenario's verification.
i will wait for a while, if no more comments receive by end of today i will update 
another new patch.
Thanks.
> 
> 
> -- 
> Regards,
> Li Wang


More information about the ltp mailing list