Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp857507imu; Tue, 20 Nov 2018 08:01:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/VO3DnY8Y5CaYw5i34lgqE46v4bu4IW50T8M++GKZ3hI+dlyMx/cLG/m7ggoHsbxQmT7veG X-Received: by 2002:a17:902:27a8:: with SMTP id d37-v6mr2836052plb.0.1542729696602; Tue, 20 Nov 2018 08:01:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542729696; cv=none; d=google.com; s=arc-20160816; b=rEOgsiF5fNEXQqiMVtTOJ45zpxj5Qm+EzTeEt/t+2onYA69HLLGDivIPJj4xGjXO1f PRe9kZf52eD1Y7rg1T7F1FnX2sX1LCbhA7M7SFlD7Wo2DmvMm2gNoFG3E2P0rrNd+a54 H1gOLNogbV7xxisDr0+YV+OQ7Woo2+3ktB/sU50MZ5rKPyr13Q53ZhRo/557Ek0A+Qlv Jg7wIqGxt2sV3H2cXcf+nvV1hg6PWMonXSnbeeBZL9ZOoSzGgXFb22nat/I8r8FXpnlA 28np3b+erRJhQRuJAAtnViYHMAf4K/73KZ0Pf/uVmTQZqK51aJtvOlhkhHeS2+XZ8LQF 5K0g== 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=nv13l7kfgGpBr50bpXeI37rOixUts/Wj+5JVsZ9WOo4=; b=hLIHXGP6ZtUyqv+YO6UM0RCuqwsUTJN7JLJzbQzc4HYPuxumMntAhp939rQn8g3h62 xSFEM+JjpA7gnowpL0A60/5PnBrjsjoFFuATaPelaxsohsuaarydSOTWHIxEqBfV1aTA 8eGKFRzqPSqAxCcAbqTs82G3Vh8IBm0gmkDPyuqNAkLY1e7gjwOy+0ZJTi+Co28r0kb6 yH9TCzX8SdmztTlqlVWN7dkX57+hsMWnYhYC7rSIZFM7siDolpJpLY75kX6iJaXYP7vT 0NngeIOK8p1uT3V4h3iH0ov+3XvD+p5J6DnxwNl3erSE0VHqifI6BQUvD5Wy60UzUY3A lzYQ== 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 cf14-v6si45221482plb.422.2018.11.20.08.01.21; Tue, 20 Nov 2018 08:01:36 -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 S1727232AbeKUBDu (ORCPT + 99 others); Tue, 20 Nov 2018 20:03:50 -0500 Received: from mx2.suse.de ([195.135.220.15]:35316 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725968AbeKUBDu (ORCPT ); Tue, 20 Nov 2018 20:03:50 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B9170AFE5; Tue, 20 Nov 2018 14:34:22 +0000 (UTC) Date: Tue, 20 Nov 2018 15:34:22 +0100 From: Michal Hocko To: David Hildenbrand Cc: linux-mm@kvack.org, Andrew Morton , Oscar Salvador , Pavel Tatashin , LKML Subject: Re: [RFC PATCH 2/3] mm, memory_hotplug: deobfuscate migration part of offlining Message-ID: <20181120143422.GN22247@dhcp22.suse.cz> References: <20181120134323.13007-1-mhocko@kernel.org> <20181120134323.13007-3-mhocko@kernel.org> 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 20-11-18 15:26:43, David Hildenbrand wrote: [...] > > + do { > > + for (pfn = start_pfn; pfn;) > > + { > > { on a new line looks weird. > > > + /* start memory hot removal */ > > + ret = -EINTR; > > I think we can move that into the "if (signal_pending(current))" > > (if my eyes are not wrong, this will not be touched otherwise) Better? diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 9cd161db3061..6bc3aee30f5e 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1592,11 +1592,10 @@ static int __ref __offline_pages(unsigned long start_pfn, } do { - for (pfn = start_pfn; pfn;) - { + for (pfn = start_pfn; pfn;) { /* start memory hot removal */ - ret = -EINTR; if (signal_pending(current)) { + ret = -EINTR; reason = "signal backoff"; goto failed_removal_isolated; } -- Michal Hocko SUSE Labs