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 X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24498C433E0 for ; Tue, 11 Aug 2020 02:12:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C9CE32065C for ; Tue, 11 Aug 2020 02:12:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="B9dBNqwM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9CE32065C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 55A4A6B0003; Mon, 10 Aug 2020 22:12:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 50B886B0005; Mon, 10 Aug 2020 22:12:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D3C86B0006; Mon, 10 Aug 2020 22:12:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id 246D86B0003 for ; Mon, 10 Aug 2020 22:12:03 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C8524180AD806 for ; Tue, 11 Aug 2020 02:12:02 +0000 (UTC) X-FDA: 77136662484.23.lock20_44045cf26fdf Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 844103760C for ; Tue, 11 Aug 2020 02:12:02 +0000 (UTC) X-HE-Tag: lock20_44045cf26fdf X-Filterd-Recvd-Size: 4838 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Tue, 11 Aug 2020 02:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597111921; h=from:from:reply-to:subject:subject: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=UpcJWKRDr1Tg2kVpFQO3d+MuEZkKwcEPtilWjHV8dpk=; b=B9dBNqwMrX3FeiZeU1k5AJ2otjNezRTC7Q4auKiDVYmlYY4S6t5/m8o9lkfGOQwcXSc32t BAZ1h3aX37yMsdMdOPmrbQIT6GC+Xr2ocUZSbqLm4w1qCRKpEt0ljXv58z2X2T4SpahOWY TXdlMhp9IzicJOkFWcbjSyj7xPjTRQg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-556-w0WbHjeRNuulnv2U_K15Og-1; Mon, 10 Aug 2020 22:11:59 -0400 X-MC-Unique: w0WbHjeRNuulnv2U_K15Og-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75EEE1DF0; Tue, 11 Aug 2020 02:11:58 +0000 (UTC) Received: from localhost (ovpn-13-96.pek2.redhat.com [10.72.13.96]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 089BA61983; Tue, 11 Aug 2020 02:11:54 +0000 (UTC) Date: Tue, 11 Aug 2020 10:11:52 +0800 From: Baoquan He To: Mike Kravetz Cc: Anshuman Khandual , linux-kernel@vger.kernel.org, linux-mm@kvack.org, david@redhat.com, akpm@linux-foundation.org Subject: Re: [PATCH v2 4/4] mm/hugetl.c: warn out if expected count of huge pages adjustment is not achieved Message-ID: <20200811021152.GW14854@MiWiFi-R3L-srv> References: <20200723032248.24772-1-bhe@redhat.com> <20200723032248.24772-5-bhe@redhat.com> <62c8ce6c-fe98-f371-99b6-cfdb96d1c2fd@arm.com> <20200723091142.GR32539@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Rspamd-Queue-Id: 844103760C X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: Hi Mike, On 07/23/20 at 11:21am, Mike Kravetz wrote: > On 7/23/20 2:11 AM, Baoquan He wrote: ... > >> But is kernel expected to warn for all such situations where the user > >> requested resources could not be allocated completely ? Otherwise, it > >> does not make sense to add an warning for just one such situation. > > > > It's not for just one such situation, we have already had one to warn > > out in mm/hugetlb.c, please check hugetlb_hstate_alloc_pages(). > > Those are a little different in that they are warnings based on kernel > command line parameters. > > > As Mike said, in one time of persistent huge page number setting, > > comparing the old value with the new vlaue is good enough for customer > > to get the information. However, if customer want to detect and analyze > > previous setting failure, logging message will be helpful. So I think > > logging the failure or partial success makes sense. > > I can understand the argument against adding a new warning for this. > You could even argue that this condition has existed since the time > hugetlb was added to the kernel which was long ago. And, nobody has > complained enough to add a warning. I have even heard of a sysadmin > practice of asking for a ridiculously large amount of hugetlb pages > just so that the kernel will allocate as many as possible. They do > not 'expect' to get the ridiculous amount they asked for. In such > cases, this will be a new warning in their log. > > As mentioned in a previous e-mail, when one sets nr_hugepages by writing > to the sysfs or proc file, one needs to read the file to determine if the > number of requested pages were actually allocated. Anyone who does not > do this is just asking for trouble. Yet, I imagine that it may happen. > > To be honest, I do not see this log message as something that would be > helpful to end users. Rather, I could see this as being useful to support > people. Support always asks for system logs and this could point out a > possible issue with hugetlb usage. > > I do not feel strongly one way or another about adding the warning. Since > it is fairly trivial and could help diagnose issues I am in favor of adding > it. If people feel strongly that it should not be added, I am open to > those arguments. Ping! It's been a while, seems no objection to log the message. Do you consider accepting this patch or offering an Ack? Thanks Baoquan