From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E7FEC433EF for ; Mon, 11 Oct 2021 08:28:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7333760EB1 for ; Mon, 11 Oct 2021 08:28:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7333760EB1 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 8A15B6B0075; Mon, 11 Oct 2021 04:28:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 850FF80009; Mon, 11 Oct 2021 04:28:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 740786B007B; Mon, 11 Oct 2021 04:28:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 60C696B0075 for ; Mon, 11 Oct 2021 04:28:25 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0A4348249980 for ; Mon, 11 Oct 2021 08:28:25 +0000 (UTC) X-FDA: 78683479770.07.EFB4CD3 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf23.hostedemail.com (Postfix) with ESMTP id 720049001B27 for ; Mon, 11 Oct 2021 08:28:24 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 54D6621FF7; Mon, 11 Oct 2021 08:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1633940903; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=u59rnkFvLY1ODAk0BhzE+Ep57KDthLSgFn/6dx9+viI=; b=Z3zxk3mE1Q2TU2hLdpv38rAHfI+h8CllDkdQX1IDSsvs1qF1nGwIY3EBYwY1MuHDGEIR3P PUslqqsAy3KnZK/Zk78iS7GTlRSVuplea90jpPg5P6uROwcvFudgDXThhHjCUQ+7NHnXJ6 KGtUUgklGrpaG/Uun/bDEexEylz5fJs= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 1A70CA3B88; Mon, 11 Oct 2021 08:28:23 +0000 (UTC) Date: Mon, 11 Oct 2021 10:28:22 +0200 From: Michal Hocko To: Mike Kravetz Cc: zhangyiru , akpm@linux-foundation.org, linux-mm@kvack.org, wuxu.wu@huawei.com, liusirui@huawei.com, liuzixian4@huawei.com Subject: Re: [PATCH RESEND v2] mm,hugetlb: remove mlock ulimit for SHM_HUGETLB Message-ID: References: <20211008195725.33083-1-zhangyiru3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 720049001B27 X-Stat-Signature: ubnky9e3eh75hf8dm7cpegzo9o64cdm3 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Z3zxk3mE; spf=pass (imf23.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam06 X-HE-Tag: 1633940904-417042 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri 08-10-21 14:26:48, Mike Kravetz wrote: > On 10/8/21 12:57 PM, zhangyiru wrote: > > 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 > > --- > > 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); > > IIUC, deprecated means that use of the feature is discouraged but > technically still available. With this patch, we use the term > deprecated and also remove the functionality. Perhaps change the > warning to be the following? > > pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is now obsolete\n", Agreed. I would even go with an addition "Please report if you have a usecase for this functionality." > Leaving the 'deprecated' message and removing the functionality may > confuse people if their application breaks after this patch. > -- > Mike Kravetz -- Michal Hocko SUSE Labs