All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhangyiru <zhangyiru3@huawei.com>
To: <mike.kravetz@oracle.com>, <akpm@linux-foundation.org>
Cc: <linux-mm@kvack.org>, <mhocko@suse.com>, <wuxu.wu@huawei.com>,
	<liusirui@huawei.com>, <liuzixian4@huawei.com>
Subject: [PATCH RESEND v2] mm,hugetlb: remove mlock ulimit for SHM_HUGETLB
Date: Fri, 8 Oct 2021 15:57:25 -0400	[thread overview]
Message-ID: <20211008195725.33083-1-zhangyiru3@huawei.com> (raw)

commit 21a3c273f88c9cbbaf7e ("mm, hugetlb: add thread name and pid to
SHM_HUGETLB mlock rlimit warning") marked this as deprecated in 2012,
but it is not deleted yet.

Mike says he still see that message in log files on occasion,
so maybe we should preserve this warning.

Signed-off-by: zhangyiru <zhangyiru3@huawei.com>
---
Changelog:
 v2: preserve warning message
 v1: remove mlock ulimit for SHM_HUGETLB
---
 fs/hugetlbfs/inode.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index cdfb1ae78a3f..877d0ce9526c 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -1470,10 +1470,9 @@ struct file *hugetlb_file_setup(const char *name, size_t size,
 			pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is deprecated\n",
 				current->comm, current->pid);
 			task_unlock(current);
-		} else {
-			*ucounts = NULL;
-			return ERR_PTR(-EPERM);
 		}
+		*ucounts = NULL;
+		return ERR_PTR(-EPERM);
 	}
 
 	file = ERR_PTR(-ENOSPC);
-- 
2.27.0



             reply	other threads:[~2021-10-08 11:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 19:57 zhangyiru [this message]
2021-10-08 21:26 ` [PATCH RESEND v2] mm,hugetlb: remove mlock ulimit for SHM_HUGETLB Mike Kravetz
2021-10-11  8:28   ` Michal Hocko

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=20211008195725.33083-1-zhangyiru3@huawei.com \
    --to=zhangyiru3@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=liusirui@huawei.com \
    --cc=liuzixian4@huawei.com \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=wuxu.wu@huawei.com \
    /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.