[LTP] [PATCH 1/1] numa01.sh: Handle computation error

Harish harish@linux.ibm.com
Fri Jul 3 05:48:08 CEST 2020


On 7/3/20 8:30 AM, Li Wang wrote:
> Hi Petr, Harish,
>
> Though the root cause is from the non-ordered node in a special 
> machine, I still think this patch makes sense to numa01, because the 
> function get_mem_cur() make code more readable.
>
> So I'm going to merge both this one and Harish's patch, after doing 
> that, I will also follow Cyril's comment to remove test8(migrate_pages).
>
> Any objections? or comments?
>
Makes sense to me.

Regards,
Harish
>
> On Thu, Jul 2, 2020 at 7:31 AM Petr Vorel <petr.vorel@gmail.com 
> <mailto:petr.vorel@gmail.com>> wrote:
>
>     ...
>     +get_mem_cur()
>      {
>             local pid=$1
>             local node=$(($2 + 2))
>     +       local size=$3
>     +       local numstat=$(numastat -p $pid |awk '/^Total/ {print
>     $'$node'}')
>
>     -       echo $(numastat -p $pid |awk '/^Total/ {print $'$node'}')
>     +       if [ -z "$numstat" ]; then
>     +               echo 0
>     +               return
>
>
>
>
> Maybe we'd better do TBROK from here if numstat doesn't work well?
>
> -- 
> Regards,
> Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200703/a4d8ea13/attachment.htm>


More information about the ltp mailing list