linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] mm,hugetlb: remove mlock ulimit for SHM_HUGETLB
@ 2021-10-09  9:43 zhangyiru
  2021-10-11 21:39 ` Mike Kravetz
  2021-11-01  7:01 ` Hugh Dickins
  0 siblings, 2 replies; 11+ messages in thread
From: zhangyiru @ 2021-10-09  9:43 UTC (permalink / raw)
  To: mike.kravetz, akpm
  Cc: linux-mm, mhocko, wuxu.wu, liusirui, liuzixian4, zhangyiru3

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:
 v4: modify context information of obsolete
 v3: modify warning message to obsolete
 v2: preserve warning message
 v1: remove mlock ulimit for SHM_HUGETLB
---
 fs/hugetlbfs/inode.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index cdfb1ae78a3f..5ff3418759ed 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -1467,13 +1467,12 @@ struct file *hugetlb_file_setup(const char *name, size_t size,
 		*ucounts = current_ucounts();
 		if (user_shm_lock(size, *ucounts)) {
 			task_lock(current);
-			pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is deprecated\n",
+			pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is obsolete\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



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-03 17:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-09  9:43 [PATCH v4] mm,hugetlb: remove mlock ulimit for SHM_HUGETLB zhangyiru
2021-10-11 21:39 ` Mike Kravetz
2021-11-01  7:01 ` Hugh Dickins
2021-11-01 19:44   ` [PATCH v5] " zhangyiru
2021-11-01 21:09     ` [PATCH v6] " zhangyiru
2021-11-01 23:05       ` Mike Kravetz
2021-11-02 15:40         ` [PATCH v7] " zhangyiru
2021-11-02 19:46           ` Mike Kravetz
2021-11-03 10:58             ` [PATCH v8] " zhangyiru
2021-11-03 17:19               ` Mike Kravetz
2021-11-01 21:39   ` [PATCH v4] " Mike Kravetz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).