Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3895253imm; Mon, 20 Aug 2018 06:34:36 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyBg/p9/K2peaW/PeIjqSOoVNDaZbzJTAA9/fFKAhfOfYmSrFlL3y0AaGUw/NLRltQpAgkg X-Received: by 2002:a63:cd02:: with SMTP id i2-v6mr42240476pgg.93.1534772076150; Mon, 20 Aug 2018 06:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534772076; cv=none; d=google.com; s=arc-20160816; b=ZAVT6Y0Fj2v2Nmxv1Aov2Xrro0FW1uNKkc0Oy7JY3/jAUOQgEM3JdCFRHQdhSBQT10 bD7CZ26Hn+3yh4pgtfnENP2bevDVpIWLyHywePrSwE6L4lEsyHvHxWsJzybZkfm8epNs HXVd3ZpdOZu0UvtsOAwLHElQmS+dbzEedwoihvOG8XtViriYeE1zAHDwTLcSqBGXthrj 9+oZHJRiMA39mh/37ZxuXmh0ZSoDRi4knYNiHtM7h2p/p/NztJSss05z07yiaJ3N8vtm k5Q12W1HQOQHdD0ZzMPF1qfQIqhtq38mCEuvthDz2c9HPMDbFCbqjBfuPgGrAAPRL3V4 qyQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature:arc-authentication-results; bh=xwXWbfxdMBCFJHvTOGjGor1FqktWUysKvhXmAdettj8=; b=MfD7m8Ge5j4PgzJtJ0gog4MqmjEThvpu6jFn8u6x4u5S7sM8svuDxfT7cZY3Gr3SGo HuYcnRGX5g8q8R73d5wzbGoo4A7PQe3ieeJlWYPtdHHGCRzsKAa2qvFzv1+m0WJno7H3 YtQMD1mFiYXwA0wAshPsoaGr9M4CajVq4LZskoMamL5K1Gk5cQPK/QciLwgauZpbVswk LOxVPYnzFJVDg5SV+qRDPlFbzOALtgwHTY0qN9hglmJl5ZRhfq3LYXLUB063TDY4UfCR 5IOfxbD+FQGW3Z8viwiB6CjJ+TimO1A2xikFilRgmPi08l4mKeNYxsv+PrQ6498gFaAC 3/oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UwSg+gpM; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3-v6si6316754pll.395.2018.08.20.06.34.20; Mon, 20 Aug 2018 06:34:36 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UwSg+gpM; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727159AbeHTQ2I (ORCPT + 99 others); Mon, 20 Aug 2018 12:28:08 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:45562 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726685AbeHTQ2H (ORCPT ); Mon, 20 Aug 2018 12:28:07 -0400 Received: by mail-ed1-f67.google.com with SMTP id s16-v6so8459496edq.12 for ; Mon, 20 Aug 2018 06:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xwXWbfxdMBCFJHvTOGjGor1FqktWUysKvhXmAdettj8=; b=UwSg+gpM5JaPoFA9bk0ua3brOTtbbc6F89tcQ4Z37Zr+65o/pqimInZho+1ZXS10Gi UFOS60qlP4T3T2/ftGdmrGdgjqjCqRVC+XCwKedVFsv23gyH8c4tHJL4x5hvVx1HgZpv C2ct2O7MDWvoupjF6Z/8f0O2+rvqlPlCafa2L+A/Lijn+yVoJ25anRJjihjam+UwX9B7 exTKOOP9UWEbzzGNVWY43aC7or0iX2ZvGzzrGWAxFBaGloXBRlvlxRanxz0U/SgVmmht MujPvqe96LHmwpXkN+UBsnyltdpyjh7+bgTstjyUg7u0hBTQ7pHjUGo6uyV+o4Th+1FC WKfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=xwXWbfxdMBCFJHvTOGjGor1FqktWUysKvhXmAdettj8=; b=lcL2D3UL7guuSC/FbxCBsVPkWwQEMeZlK+xw7l25TPVAHfVA/Lj9MdkfeJuIcdi3IY KXDsVlVmhlofV13S2SvTT4wLMrzizwqvUf1NaHFcrR898/Arrw0Lb+uB4+DTdfTn9ztl SVDOGDoM0aF+LzBPHk3+yEkbjgJDQsnwxvvDICjVwYECTmkZBKLmi4oIOzgfwmNQxsLG wzS9O88on4f18l8heD+rsniSqfT06UdQs3mFOeuSqXqF+PukFJbIJ3rXk5eRU3g7Nxq7 hW56RqpgTn+7s1Nn5pnR1T5yFuw3DkNf1YH0cPbGdeZSo6Yk+wZrPhNKYzToZEAvx4EX 7jTA== X-Gm-Message-State: AOUpUlFGLU7PPAtcNw8tEu1Vi+0fxco+JJMsYvhD5AHS1uWYSv39Zg8j 53ooVBguamiNFLLg+nxAi9U= X-Received: by 2002:a50:b5e6:: with SMTP id a93-v6mr54916169ede.94.1534770750686; Mon, 20 Aug 2018 06:12:30 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id g38-v6sm815102edc.40.2018.08.20.06.12.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Aug 2018 06:12:30 -0700 (PDT) Date: Mon, 20 Aug 2018 13:12:29 +0000 From: Wei Yang To: David Hildenbrand Cc: Wei Yang , Oscar Salvador , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Michal Hocko , Vlastimil Babka , Stephen Rothwell , Pavel Tatashin , Kemi Wang , David Rientjes , Jia He , Oscar Salvador , Petr Tesarik , Andrey Ryabinin , Dan Williams , Mathieu Malaterre , Baoquan He , Ross Zwisler , "Kirill A . Shutemov" Subject: Re: [PATCH v1 5/5] mm/memory_hotplug: print only with DEBUG_VM in online/offline_pages() Message-ID: <20180820131229.mloadxcqmfb3skdo@master> Reply-To: Wei Yang References: <20180816100628.26428-1-david@redhat.com> <20180816100628.26428-6-david@redhat.com> <20180817081853.GB17638@techadventures.net> <20180819123403.GA22352@WeideMacBook-Pro.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 20, 2018 at 11:57:04AM +0200, David Hildenbrand wrote: >On 19.08.2018 14:34, Wei Yang wrote: >> On Fri, Aug 17, 2018 at 10:18:53AM +0200, Oscar Salvador wrote: >>>> failed_addition: >>>> +#ifdef CONFIG_DEBUG_VM >>>> pr_debug("online_pages [mem %#010llx-%#010llx] failed\n", >>>> (unsigned long long) pfn << PAGE_SHIFT, >>>> (((unsigned long long) pfn + nr_pages) << PAGE_SHIFT) - 1); >>>> +#endif >>> >>> I have never been sure about this. >>> IMO, if I fail to online pages, I want to know I failed. >>> I think that pr_err would be better than pr_debug and without CONFIG_DEBUG_VM. >>> >>> But at least, if not, envolve it with a CONFIG_DEBUG_VM, but change pr_debug to pr_info. >>> >> >> I don't have a clear rule about these debug macro neither. >> >> While when you look at the page related logs in calculate_node_totalpages(), >> it is KERNEL_DEBUG level and without any config macro. >> >> Maybe we should leave them at the same state? > >I guess we can do that for the to debug messages. > >When offlining memory right now: > >:/# echo 0 > /sys/devices/system/memory/memory9/online >[ 24.476207] Offlined Pages 32768 >[ 24.477200] remove from free list 48000 1024 50000 >[ 24.477896] remove from free list 48400 1024 50000 >[ 24.478584] remove from free list 48800 1024 50000 >[ 24.479454] remove from free list 48c00 1024 50000 >[ 24.480192] remove from free list 49000 1024 50000 >[ 24.480957] remove from free list 49400 1024 50000 >[ 24.481752] remove from free list 49800 1024 50000 >[ 24.482578] remove from free list 49c00 1024 50000 >[ 24.483302] remove from free list 4a000 1024 50000 >[ 24.484300] remove from free list 4a400 1024 50000 >[ 24.484902] remove from free list 4a800 1024 50000 >[ 24.485462] remove from free list 4ac00 1024 50000 >[ 24.486381] remove from free list 4b000 1024 50000 >[ 24.487108] remove from free list 4b400 1024 50000 >[ 24.487842] remove from free list 4b800 1024 50000 >[ 24.488610] remove from free list 4bc00 1024 50000 >[ 24.489548] remove from free list 4c000 1024 50000 >[ 24.490392] remove from free list 4c400 1024 50000 >[ 24.491224] remove from free list 4c800 1024 50000 >... > >While "remove from free list" is pr_info under CONFIG_DEBUG_VM, >"Offlined Pages ..." is pr_info without CONFIG_DEBUG_VM. Hmm... yes, don't see the logic between them. > >-- > >Thanks, > >David / dhildenb -- Wei Yang Help you, Help me