Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp121588imj; Thu, 7 Feb 2019 01:25:54 -0800 (PST) X-Google-Smtp-Source: AHgI3IYLrFX+7K5MddVUk22SIVIdct+FIy2gbsmARUpW+lsuss4VuJJhZZaVuidWeoa1cnOteTcU X-Received: by 2002:a17:902:8b81:: with SMTP id ay1mr8963851plb.320.1549531554677; Thu, 07 Feb 2019 01:25:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549531554; cv=none; d=google.com; s=arc-20160816; b=Hz+suujwzV5NGbYA1kbkO9yNO9h0A5U41shUGw+1dn20YZw18x+nrVIsKjvoqXWDtx v6+xZoeBdlWl3fn1PB7/ttpDRyixjmqS7vNheF+C6qUdBc7zq6udDZWcyw0eBTOni9iz Gj86ZfYjs0QDxfHXQbRXtUCZLq1G1+UTbcVCxuWYQYS3IXjn0C97rsob4HVI+FQztF0K 2UT3syVyv18u6Rymphya6/Cfz8g1aIjRfuB//pUntgvLfcrj51ju0TfaTxVyj3YFTxRO luaYDdBNMoKvhFzFomO0sp4bJ07qMAXaPIKjdPK1MkKjEK5Q48MgUhLJcjAYAKcVv/ma 464w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=syXs9de5wupP27x/ISO6fQ4/IkfabnFF3iH427YEyGI=; b=Cw+Lje1YwLdSH5PPvYA7afcfo+i4HnmPc3tJ8+o4XFvvUph77uA0BV6lAxvPbmnGCk AhJIrRAqy0JHVrh0GQClzyHIlbhJVuQ+BWcuA4f7KmXNiPVvqj0sEo/0uWLUtnFRwPgX cEoTkREyvheB/xk2dsKsUvpvklo7zcN7TKjYQrhFcSAeUe9xXRKWgs7tjIvoMw6/HVfp eJ2O/UG8coIzvUg2rMEn8LbnmHAOKZbVJNFAIR5k6mjUIyZPC61q48Rf4TSurIni86OF qJW9Qfjw7f+yqCO7C925wsT4UxpYJOAyueVc9uan+ZvRykjXKfJv1I7JJ/p0AygLk/lF Ombw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m188si699524pfb.266.2019.02.07.01.25.39; Thu, 07 Feb 2019 01:25:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727080AbfBGJZQ (ORCPT + 99 others); Thu, 7 Feb 2019 04:25:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44484 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727037AbfBGJZM (ORCPT ); Thu, 7 Feb 2019 04:25:12 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7D16B88E64; Thu, 7 Feb 2019 09:25:12 +0000 (UTC) Received: from [10.40.204.71] (ovpn-204-71.brq.redhat.com [10.40.204.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED8F61048125; Thu, 7 Feb 2019 09:25:10 +0000 (UTC) Subject: Re: [PATCH v2] powerpc/mm: move a KERN_WARNING message to pr_debug() To: David Gibson Cc: linux-kernel@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Christophe Leroy References: <20190205202133.5048-1-lvivier@redhat.com> <20190207030305.GA518@umbus.fritz.box> From: Laurent Vivier Message-ID: <632657bb-acd7-54bd-ac02-0d6f9d87d26b@redhat.com> Date: Thu, 7 Feb 2019 10:25:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20190207030305.GA518@umbus.fritz.box> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 07 Feb 2019 09:25:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/02/2019 04:03, David Gibson wrote: > On Tue, Feb 05, 2019 at 09:21:33PM +0100, Laurent Vivier wrote: >> resize_hpt_for_hotplug() reports a warning when it cannot >> increase the hash page table ("Unable to resize hash page >> table to target order") but this is not blocking and >> can make user thinks something has not worked properly. >> As we move the message to the debug area, report again the >> ENODEV error. >> >> If the operation cannot be done the real error message >> will be reported by arch_add_memory() if create_section_mapping() >> fails. >> >> Fixes: 7339390d772dd >> powerpc/pseries: Don't give a warning when HPT resizing isn't available >> Signed-off-by: Laurent Vivier > > Sorry, I'm pretty dubious about this. It's true that in the case for > which this bug was filed this is a harmless situation which deserves a > pr_debug() at most. > > But that's not necessarily true in all paths leading to this message. > It will also trip if we fail to reshrink the HPT after genuinely > hotunplugging a bunch of memory, in which case failing to release > expected resources does deserve a warning. But if there is a real problem this function should return an error and this error should be managed by the caller. Moreover, the function that can fail (pseries_lpar_resize_hpt()) has already a warning for each error case: ETIMEDOUT: "Unexpected error %d cancelling timed out HPT resize\n" EIO: "Unexpected error %d from H_RESIZE_HPT_PREPARE\n" "Unexpected error %d from H_RESIZE_HPT_COMMIT\n ENOSPC: "Hash collision while resizing HPT\n" ENODEV has no error message but is already silently ignored. EINVAL and EPERM have no message but this happens if hcall is not used correctly and deserve only a pr_debug() I think. Thanks, Laurent