Re: [Fwd: Re: [LTP]: Test Case Design for move_pages()]]

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

 



Thanks Andi for providing those feedback.

Vijay,

Would you like to incorporate Andi´s review comments inthe next patch.


On Mon, 2008-06-30 at 14:39 +0200, Andi Kleen wrote:
> > +void
> > +verify_pages_on_nodes(int *status, unsigned int num, int *nodes)
> > +{
> > +	unsigned int i;
> > +
> > +	for (i = 0; i < num; i++) {
> > +		if (status[i] != nodes[i]) {
> > +			tst_resm(TFAIL, "page %d on node %d, "
> > +				 "expected on node %d", i,
> > +				 status[i], nodes[i]);
> > +			return;
> > +		}
> 
> The correct way to verify this would be to use get_mempolicy(..., MPOL_F_NODE|MPOL_F_ADDR, &node)
> on each page and check if the node is correct.
> 
> 
> 
> 
> 
> > +void
> > +check_config(unsigned int min_nodes)
> > +{
> > +	if (numa_available() < 0) {
> > +		tst_resm(TCONF, "NUMA support is not available");
> > +		tst_exit();
> > +	}
> > +
> > +	if (numa_max_node() < (min_nodes - 1)) {
> > +		tst_resm(TCONF, "atleast 2 NUMA nodes are required");
> > +		tst_exit();
> > +	}
> > +
> > +	if (tst_kvercmp(2, 6, 18) < 0) {
> > +		tst_resm(TCONF, "2.6.18 or greater kernel required");
> > +		tst_exit();
> > +	}
> 
> This check seems unfortunate because the syscall might be backported.

Andi, this can be Ok for the time being. Actually we do this for lot of
tests in LTP. Meanwhile, when the syscall gets backported we can reduce
this value as well.

Regards--
Subrata

> 
> 
> -Andi

--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux