Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp249188ybl; Tue, 7 Jan 2020 05:37:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwkFzzE6lQxDPy20xqACkVZfHgc6IWvW3TISOyqkaCU6cZ9qr+BMBjt2hZODXUwoF0EB4R3 X-Received: by 2002:a9d:4e97:: with SMTP id v23mr115549522otk.201.1578404267923; Tue, 07 Jan 2020 05:37:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578404267; cv=none; d=google.com; s=arc-20160816; b=C9VWYHdCTpJ19w+QZY1bwJyUnj5O2QS7qxwGcaf1ZL7yu5ks29+4JRITVyceXnaEnZ zHqCYlucUagS/cCLrJwaUYQZscN4zq+xx39o2xQ5XgWZvcbjNLxh4tyu0pUAK4FIFGPS KHjvSsisvsiwKyXf1KeEff+oTRSD0UA7M6e+H3gsScPugkpt34XALkkr6c+M6/Mlw+2W 8U+L48h6VcmkldIPQ7PxsbbinTgelxbCA4qh01kekfSYS0d8UgZfNojmSnW5mM4yw5IB v2ib4LM2BIw+6g69DolhMQ5ShiAkjZteSrzCxwKAVIscUG4eESGulyeRQndSaHbXolfb XR8Q== 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:message-id:subject:cc :to:from:date; bh=AH8QrVtR12IeR8yMYo+97ujGygRwsjvu4AYsXyeVsN4=; b=lFUsRO9Y7Lrz2RzZQ1veiA/Xa5dQnOE9qfgFuKK9eUvslMbUFWDUZt7Pytq3v2vuUS CFEeMXZMIEesX6I5AVHkbPY949uPiLPiTfdqSuYIW6D3WYsL1IcVucCvwbymUrYQi0Om x8vpH8zASiUK6/Bze9mR+LhVNUqoue3RNXo58rgCParV3GL3/HY65PTmhD/SZOjHGe22 8CkFBap2rGCnI2+2jLokrqv+jUWkhtsxQaRlQSPF3Vvf2wgx0TzID4ocYrY95qKW/s/i wtfEow1v+WarDcqbQ5up/+VtjMy0TtdwrOJ+ssa8Vzxi99GjeUw4imBfqnP3LPpjYoCq Y0sQ== 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 q9si33664230oif.92.2020.01.07.05.37.35; Tue, 07 Jan 2020 05:37:47 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728301AbgAGNg2 (ORCPT + 99 others); Tue, 7 Jan 2020 08:36:28 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:39494 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727944AbgAGNg1 (ORCPT ); Tue, 7 Jan 2020 08:36:27 -0500 Received: by mail-wr1-f68.google.com with SMTP id y11so53947646wrt.6; Tue, 07 Jan 2020 05:36:25 -0800 (PST) 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:user-agent; bh=AH8QrVtR12IeR8yMYo+97ujGygRwsjvu4AYsXyeVsN4=; b=Jvp+5VtcpYOml5Xnhk48gWmHYAeEUI3AvmIrtkYy0R1QdyM953N7vZmAZZJC5NSGyu yi8USaYbD1xM0Ql2wz6wWfiAI2C5jDcqGtIseHx1QKvB/lbZ7hfmNlN1DsPZkuaZ+O1R +VNTVLOfvtz/s6yPz9cWSNUP+Q6U6+W359kX64ACVs6x1WTkieV7Lz4NMSW7EyFL03uP RJ5RJf6JuWZyM2CekHmzrvfWl3mxg82W/aYsQBoocgmFzZnFm4JDCeUmhuEWyIqwIrDQ e21jw9srnYuvEVxZQSinWWBYUxsNozTG6Ehb+rFFmNZ+OrflljfssybxGOLPKdnNa2pR jMjw== X-Gm-Message-State: APjAAAXXgmoUJVdkv8WYW6rdnc90bEoekvcIfBi+RictlR/rJazK1zMV H0Xbqv4jN8a3Y/kcjInbBbg= X-Received: by 2002:adf:db84:: with SMTP id u4mr111448345wri.317.1578404185319; Tue, 07 Jan 2020 05:36:25 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id f16sm76245530wrm.65.2020.01.07.05.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 05:36:24 -0800 (PST) Date: Tue, 7 Jan 2020 14:36:23 +0100 From: Michal Hocko To: lantianyu1986@gmail.com Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, sashal@kernel.org, akpm@linux-foundation.org, michael.h.kelley@microsoft.com, david@redhat.com, Tianyu Lan , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, vkuznets@redhat.com, eric.devolder@oracle.com, vbabka@suse.cz, osalvador@suse.de, pavel.tatashin@microsoft.com, rppt@linux.ibm.com Subject: Re: [RFC PATCH V2 2/10] mm: expose is_mem_section_removable() symbol Message-ID: <20200107133623.GJ32178@dhcp22.suse.cz> References: <20200107130950.2983-1-Tianyu.Lan@microsoft.com> <20200107130950.2983-3-Tianyu.Lan@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200107130950.2983-3-Tianyu.Lan@microsoft.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 07-01-20 21:09:42, lantianyu1986@gmail.com wrote: > From: Tianyu Lan > > Hyper-V balloon driver will use is_mem_section_removable() to > check whether memory block is removable or not when receive > memory hot remove msg. Expose it. I do not think this is a good idea. The check is inherently racy. Why cannot the balloon driver simply hotremove the region when asked? -- Michal Hocko SUSE Labs