----- Original Message -----
> From: "Andrew Morton" <[email protected]>
> To: "Jan Stancek" <[email protected]>
> Cc: [email protected], [email protected], 
> [email protected], "mike kravetz"
> <[email protected]>, "hillf zj" <[email protected]>, "kirill 
> shutemov"
> <[email protected]>, "dave hansen" 
> <[email protected]>, "paul gortmaker"
> <[email protected]>
> Sent: Friday, 4 March, 2016 10:38:07 PM
> Subject: Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers
> 
> On Thu,  3 Mar 2016 11:02:51 +0100 Jan Stancek <[email protected]> wrote:
> 
> > Replace ENOTSUPP with EOPNOTSUPP. If hugepages are not supported,
> > this value is propagated to userspace. EOPNOTSUPP is part of uapi
> > and is widely supported by libc libraries.
> 
> hm, what is the actual user-visible effect of this change?  Does it fix
> some misbehaviour?
> 

It gives nicer message to user, rather than:
# cat /proc/sys/vm/nr_hugepages
cat: /proc/sys/vm/nr_hugepages: Unknown error 524

And also LTP's proc01 test was failing because this ret code (524)
was unexpected:
proc01      1  TFAIL  :  proc01.c:396: read failed: /proc/sys/vm/nr_hugepages: 
errno=???(524): Unknown error 524
proc01      2  TFAIL  :  proc01.c:396: read failed: 
/proc/sys/vm/nr_hugepages_mempolicy: errno=???(524): Unknown error 524
proc01      3  TFAIL  :  proc01.c:396: read failed: 
/proc/sys/vm/nr_overcommit_hugepages: errno=???(524): Unknown error 524

Regards,
Jan

Reply via email to