All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] proc01: handle EOPNOTSUPP if !hugepages_supported()
Date: Tue, 7 Jun 2016 18:09:24 +0200	[thread overview]
Message-ID: <20160607160924.GA5810@rei> (raw)
In-Reply-To: <f4698e880d970a74fb613191748487183cf35e08.1465311184.git.jstancek@redhat.com>

Hi!
> This patch adds an entry to known issue list. These 2 proc files
> may return EOPNOTSUPP if CONFIG_HUGETLB_PAGE=Y and hugepages_supported()
> is false:
>   /proc/sys/vm/nr_hugepages: errno=EOPNOTSUPP(95): Operation not supported
>   /proc/sys/vm/nr_overcommit_hugepages: errno=EOPNOTSUPP(95): Operation not supported
> 
> from mm/hugetlb.c:
> --------------------------------- 8< ---------------------------------
> static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
>                          struct ctl_table *table, int write,
>                          void __user *buffer, size_t *length, loff_t *ppos)
> {
>         struct hstate *h = &default_hstate;
>         unsigned long tmp = h->max_huge_pages;
>         int ret;
> 
>         if (!hugepages_supported())
>                 return -EOPNOTSUPP;
> --------------------------------- >8 ---------------------------------
> 
> I've noticed this issue on s390 only after this commit:
>   commit 7f9be77555bb2e52de84e9dddf7b4eb20cc6e171
>   Author: Dominik Dingel <dingel@linux.vnet.ibm.com>
>   Date:   Fri Jul 17 16:23:39 2015 -0700
>     s390/hugetlb: add hugepages_supported define
> 
> Also note, that kernel versions prior to 4.4 may fail with
> ENOTSUPP, which has been changed to EOPNOTSUPP by:
>   commit 86613628b3d367743f71b945c203774c522404f4
>   Author: Jan Stancek <jstancek@redhat.com>
>   Date:   Wed Mar 9 14:08:35 2016 -0800
>     mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers
> 
> Given that nobody complained running into this issue before,
> it's assumed that this is not common and therefore this patch
> adds only EOPNOTSUPP to list.

I've stumbled upon this failure as well, I was about to prod you to
submit exactly this patch. Acked, and thanks :).

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-06-07 16:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 14:54 [LTP] [PATCH] proc01: handle EOPNOTSUPP if !hugepages_supported() Jan Stancek
2016-06-07 16:09 ` Cyril Hrubis [this message]
2016-06-07 16:10 ` Cyril Hrubis
2016-06-07 16:49   ` Jan Stancek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160607160924.GA5810@rei \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.