Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2718833ybh; Mon, 16 Mar 2020 08:25:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt76+6Chpqd9+Hnu8zzJSDv+8tdmsM4eRGETiRhZ4VSRI18RwT5CWIvHOQUiy9wjxFJJZNh X-Received: by 2002:a05:6830:1498:: with SMTP id s24mr14241703otq.350.1584372351517; Mon, 16 Mar 2020 08:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584372351; cv=none; d=google.com; s=arc-20160816; b=gUICc4EUsn6m4UItx/GoYA8J2aTbsX4jzLTAI3hp+Yj0xpmLvTogThiovoNKOR9TCV X/cBI0ju4kP42Wj/vh1Z/00+dYwZoQc/R+JMz6vOjfWtu362dtnsUZJBvUl02sS32zE4 xkmv6tJMmYI1dCgW0ThEoE2IGEYNushovEkcfkYif3RFkziMhdMoQR9eILEy2VH3ERQw /fvH4w5h+7tO++2frI4RoVF5zw7/caCUH8ZAT8A+4sDJMXNFnLz3T7o8N39A9YNawzhl b52ehIufSaiBYOqVKK2Rv5J71qRuXShXHPypebfef+xTPAT9tkx5HC78k4AhQa0GCHQE cMdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=n/vSqbJLFSGGAzMuc9Ghgl2CCp2FLye+L7Ituywfqjo=; b=h7IelO3DkIaA3OSYBylUUJp5Uvo3x4bU5xm4R1uyI1e8lmXyx/+m3VWtkNsin11GOd wQllM6Vr0sYmdHerGItRP+EFepOKr7/BYPCgfgQt7lYwqC/PoRlXAUDpYEZO1jB8TU/u Xzuws6MfL1OadxrAo1uvJq+u0Scb4KGry4oINEUWYgHHHaoblTtYOR7Nth3xegZzWIQu VvOUbgkz0YhB0LBCJ4Xo0eYjrkQnEhOfVVGcw+O+l1xL/9NqZaZdwbFf4dxSHe4QDcah 75Z8aNOcZ2cJE/HdYjAb5LLbjFC3CvhDvk0HWQ/7jlNex19v5OOiCfXyOWa+8onSQ6iU yLHg== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si142446oib.46.2020.03.16.08.25.38; Mon, 16 Mar 2020 08:25:51 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731713AbgCPPZD (ORCPT + 99 others); Mon, 16 Mar 2020 11:25:03 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54942 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731483AbgCPPZD (ORCPT ); Mon, 16 Mar 2020 11:25:03 -0400 Received: by mail-wm1-f68.google.com with SMTP id n8so18117874wmc.4; Mon, 16 Mar 2020 08:25:01 -0700 (PDT) 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:references :mime-version:content-disposition:in-reply-to; bh=n/vSqbJLFSGGAzMuc9Ghgl2CCp2FLye+L7Ituywfqjo=; b=HuQJKhrYDGj9WORZ3EwLWze5uISIFCjKql0IJRlqFobZ7+nG/st9ZI85DB+x91we7c Ye3El03eF2FwNdZTwfXG7sRk3+TYevm3VpIOF5jkmt5nCyBaBI9Z9WjxVMquvSzDdbe0 FRZ373E5xnghbDXhqJaJnypYJ3yQ5ivP5jugYg/+AmvlygQLXcbIaba88XQ8pYtcFOn0 wcqd5I8kbBuU1BOAhBLQ6jG+5YEbmmROZ7FNVT38beBVBMfWubjTfb9cuMujYbnzkkr2 mUS4iqR6PiS1LovwtnCba7kK4wXc/ofh/uneBws5IplkF+TWE0NicOI/IXvNkiLjmRjR 1aoQ== X-Gm-Message-State: ANhLgQ1qSOM75COdEW8sHYkCJbSqq5Fa0lEfMLWu8EBEnDC48EorlEUQ EoFRj++C3yqpvBBiORkRlho= X-Received: by 2002:a1c:a584:: with SMTP id o126mr28710245wme.49.1584372300910; Mon, 16 Mar 2020 08:25:00 -0700 (PDT) Received: from localhost ([37.188.132.163]) by smtp.gmail.com with ESMTPSA id q72sm48569wme.31.2020.03.16.08.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 08:25:00 -0700 (PDT) Date: Mon, 16 Mar 2020 16:24:59 +0100 From: Michal Hocko To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org, Greg Kroah-Hartman , Andrew Morton , Oscar Salvador , "Rafael J. Wysocki" , Baoquan He , Wei Yang , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Thomas Gleixner Subject: Re: [PATCH v1 4/5] mm/memory_hotplug: convert memhp_auto_online to store an online_type Message-ID: <20200316152459.GV11482@dhcp22.suse.cz> References: <20200311123026.16071-1-david@redhat.com> <20200311123026.16071-5-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311123026.16071-5-david@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 11-03-20 13:30:25, David Hildenbrand wrote: [...] > diff --git a/arch/powerpc/platforms/powernv/memtrace.c b/arch/powerpc/platforms/powernv/memtrace.c > index d6d64f8718e6..e15a600cfa4d 100644 > --- a/arch/powerpc/platforms/powernv/memtrace.c > +++ b/arch/powerpc/platforms/powernv/memtrace.c > @@ -235,7 +235,7 @@ static int memtrace_online(void) > * If kernel isn't compiled with the auto online option > * we need to online the memory ourselves. > */ > - if (!memhp_auto_online) { > + if (memhp_default_online_type == MMOP_OFFLINE) { > lock_device_hotplug(); > walk_memory_blocks(ent->start, ent->size, NULL, > online_mem_block); Whut? This stinks, doesn't it. For your defense, the original code is fishy already but this just makes it even more ugly. -- Michal Hocko SUSE Labs