From patchwork Fri Nov 16 08:30:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 10685709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2685614E2 for ; Fri, 16 Nov 2018 08:30:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 172842D674 for ; Fri, 16 Nov 2018 08:30:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09F342D6A1; Fri, 16 Nov 2018 08:30:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A000A2D681 for ; Fri, 16 Nov 2018 08:30:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AFFAD6B0881; Fri, 16 Nov 2018 03:30:38 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A87146B0882; Fri, 16 Nov 2018 03:30:38 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9527E6B0883; Fri, 16 Nov 2018 03:30:38 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by kanga.kvack.org (Postfix) with ESMTP id 38D9D6B0881 for ; Fri, 16 Nov 2018 03:30:38 -0500 (EST) Received: by mail-ed1-f71.google.com with SMTP id c53so2675268edc.9 for ; Fri, 16 Nov 2018 00:30:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=k4D3ilvRNbEdywbamB4FAtEIm3b4AWw0D1l/xvNW28A=; b=M3e4rnKhZF6b9Rlirn8GUYNHfXANocdVXHDH0uKtV51Zlmg5c3Iwy4f5+y59MH2EWA Ykdp9E7SX+Twh5igY1GYx3zP2rrgquYkCMWJfM/KlRx5WveFDLaAKEkS/PAiXIm8c7il b7YmgZx70dGiz3sCmsoucVzzDlaJzBscIMnBG7pkUu0G9fmMfpYXKijFFp1qg9wrvnth 7QnTdrQjzBTx7uzA4p4Eo5tc7PucyxPrSDGO/0pSdGGecEpG7+UchL6ErBGlm8vbbptV Ayr79vJyxuJDOU+n0qeGWzNtd0A9CHUa8mSv6nKdrWTxaLcYW28UnIoGHHKsKJ6IYV/F FRTA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Gm-Message-State: AGRZ1gK+8RGeqtlvvuURmVP0UYpO/5BQjErMB2V2nGRSaZDikeRlyfIy yeSbx2yZ3TuN4sqzZnGPrZTPkYoUE+sMuykPEOglNA+BR9amUlpeyzR9b+3PWybmb2qJfFsXYjS s2k/xuPmwF+oGlZ9xL22c6r3NT/2OJVERU8LQD+YYeRimtH7VlsDmMh+YB8bW+mCM7P/uofWL9r 92kc7fsYYwciOPwP1qoN4VMa20enIFXgJ/a42cYDSzA4r1RbsiFmK20muKwkqEbOGWxKLArXok6 riyA08QDfDRfXbrzoKCaBKtvl7BZEWNW0NuuT3AwjXFF/gKW0YlXHB8KbfZ6DsXXQ5+PxisBGEU OHw9/HXzz8w/3h3ayvZd7YX4ORktJocOXuUl+a4NaNEblLV2dHU8pfewjPCw3dcOVZxa2YH61Q= = X-Received: by 2002:a50:d48a:: with SMTP id s10-v6mr8663360edi.127.1542357037748; Fri, 16 Nov 2018 00:30:37 -0800 (PST) X-Received: by 2002:a50:d48a:: with SMTP id s10-v6mr8663326edi.127.1542357036965; Fri, 16 Nov 2018 00:30:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542357036; cv=none; d=google.com; s=arc-20160816; b=Bm9I6jsPIAmNIMA3Li3xIbT9Xoh8P5unze3PT+86ijrVpdOKn+LM+2LnfV/3qEIVLD zCCgDZr+BeTkviA5RvI74xY7LJepv9udmOKHvzAgFnf8Nv3TFFubDIrXVQ4xpykQ1X0z ct6PM+AE2Xe6iwjxIgY7w6APYaWK/GpNNIFKubCiyz5TqrxiFojsHLfbKL14NX4lWI3N pBjd1b2mNlTFvbOFNnwzLNSll2COQcSA+utJS8uH56e/aTPZRJJUaXkbD+5mwvf8r7Bc x5+vPaDvVJLgTUi8kqJV6iR/7WDxdSHcH81L3a/yQ+HuDU25kRApfQ8D9qYb5287+dxI DpgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=k4D3ilvRNbEdywbamB4FAtEIm3b4AWw0D1l/xvNW28A=; b=IpZdjb/jdjib8ngw1AYQ+uzRI8Bw6NsaW23HJnX38I9I2M/t5J8K+2xoDrejLcus1a BD1V4VxVXbyQCFTLpmGBkcH0Moddid3kvuQqbZF0lbVS6GLYep8zkR7K9MgxUKjkR/yr 3Mgqw0eUG+JyhODoXYPLUAkaaVk6SP2tTg95E2Nl64XTWrviWeXWyHkmbFFQvBoGPugK pBDiAe/LVWuPja6NFFHoPXiCMQtDuVNspOiFrCnsi47HgSWheHjg+xa4+0nQi/lHpkuW YB86+reoJXfSxCWc1MBtTdIdH2TrHPegB5QsckwXmcCAy1dXvyS4OaUblk45FUSsTfyt 2zog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id g20-v6sor4747298ejt.1.2018.11.16.00.30.36 for (Google Transport Security); Fri, 16 Nov 2018 00:30:36 -0800 (PST) Received-SPF: pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Google-Smtp-Source: AJdET5ce8thTuMJ1q0vegNyv6CKr019FdypPkBANPR2wA8fynBbK/HMeJFfdMuj/HhmEqB5Y+sYBvg== X-Received: by 2002:a17:906:f6cb:: with SMTP id jo11-v6mr1444856ejb.80.1542357036521; Fri, 16 Nov 2018 00:30:36 -0800 (PST) Received: from tiehlicka.suse.cz (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id m13sm5305393edd.2.2018.11.16.00.30.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 00:30:35 -0800 (PST) From: Michal Hocko To: Andrew Morton Cc: Oscar Salvador , Baoquan He , Anshuman Khandual , , LKML , Michal Hocko Subject: [PATCH 3/5] mm, memory_hotplug: drop pointless block alignment checks from __offline_pages Date: Fri, 16 Nov 2018 09:30:18 +0100 Message-Id: <20181116083020.20260-4-mhocko@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181116083020.20260-1-mhocko@kernel.org> References: <20181116083020.20260-1-mhocko@kernel.org> MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Michal Hocko This function is never called from a context which would provide misaligned pfn range so drop the pointless check. Signed-off-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: Anshuman Khandual --- mm/memory_hotplug.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 2b2b3ccbbfb5..a92b1b8f6218 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1554,12 +1554,6 @@ static int __ref __offline_pages(unsigned long start_pfn, struct zone *zone; struct memory_notify arg; - /* at least, alignment against pageblock is necessary */ - if (!IS_ALIGNED(start_pfn, pageblock_nr_pages)) - return -EINVAL; - if (!IS_ALIGNED(end_pfn, pageblock_nr_pages)) - return -EINVAL; - mem_hotplug_begin(); /* This makes hotplug much easier...and readable.