From patchwork Thu Aug 23 13:07:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 10573793 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 D57BD14E1 for ; Thu, 23 Aug 2018 13:08:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6C752A510 for ; Thu, 23 Aug 2018 13:08:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEB912A752; Thu, 23 Aug 2018 13:08:11 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 8F8DC2C0BE for ; Thu, 23 Aug 2018 13:08:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2FC116B2A2E; Thu, 23 Aug 2018 09:07:59 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2AB866B2A2F; Thu, 23 Aug 2018 09:07:59 -0400 (EDT) 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 1C1D56B2A30; Thu, 23 Aug 2018 09:07:59 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by kanga.kvack.org (Postfix) with ESMTP id DF1696B2A2E for ; Thu, 23 Aug 2018 09:07:58 -0400 (EDT) Received: by mail-pf1-f199.google.com with SMTP id d22-v6so3198351pfn.3 for ; Thu, 23 Aug 2018 06:07:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id; bh=few5kL0JOkc3THFwp2ZJK3r9S/Gy0DCKiV6Ve6yiiu0=; b=aRdClCtcG2HDVuZzYSSxOv36qnTaVss1bjTFpEarx3bWiusTzds0cGdvRUfUkFJ19w WIfGxwaqA7syIa9j4gWd7+Q3rB7fJlbnpuFp3Y+lkYYdv5OltdS+w2iBYHfoeBPkm0Aa 0sg/AqSvzXsyk97oTTVx5FyieMAxoGX7faTnNOdrswubqbd2FEx/8wVSJX3XTcJH3OcW lJI5ky5tFIG/uiouZkRvY+NbuQZEKX1GShx/zn71l6YXwP1pax95UFYva4MKlUC6emEn rDYl1Qyxh8RODgcO+maVn5vyX31IRW2BnImvq44h2kFxYZC8ivq6U+SkIu1eIFwC6Ujc /95Q== X-Gm-Message-State: APzg51BnLAW8wJ1As399JEDa9wVMnDdr0SX228qR/VpOkAtnWOwuxiOr J5EJLLeJbQPRYDBu2hxHueCOOgavHbKxvltNfEb2Nzzsek4oTAUclXo/ac20CruUbdjFZDRNx7E UGRoZ5DK6BAoEwbBPqL3vbGVqhGno5+pi1ir5bv2GTzKqnWEiU9v5EcwtEsTAiqM3A/ulbtY/7M RAWFBMM9kq9unJ1ao1iKID6mchG6AB6ijvTyp/H1R/wRf4SH9l+dyEOblkRxb7eHeQsOctRZHtf 6A3Pj6lqwWKPsF0nNSpg+sEOThcWOBKaIOSpA5O80U5NBzYMohX4LrjrB/5K5IN6fStHGk1EoGs XwLd4amgUJK3O5hmhyOOhmYA9BnYKP+klzwu5AM9VQZHYFrAbgLKjNItxL6ZeY1uAJWafkPTxYB A X-Received: by 2002:a17:902:a5c2:: with SMTP id t2-v6mr10421076plq.85.1535029678595; Thu, 23 Aug 2018 06:07:58 -0700 (PDT) X-Received: by 2002:a17:902:a5c2:: with SMTP id t2-v6mr10421009plq.85.1535029677469; Thu, 23 Aug 2018 06:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535029677; cv=none; d=google.com; s=arc-20160816; b=Y+KDnFcXAMmZcFXkS2LvBu1As5YGBjL85CFwyJAeSDxTblbkZFtdfX/WpVYMUk5WfS g1gzeDkWKotbsiWDoQAmyR83Sbb/0bW4XoGFbhkqXHi4701EdzhADbEBpXVrCEOkHawj VMZt4jd/t5/Y6av5CPQTgDZgX5r2eaHs8QXG4wEyYv6aIDJH/ZL5wQTtoHwF+pl4FmXO IKQUqhJGzmtWJYcghwUp+3tLrHIY27faE/Xbyj+p+2S1EYeGinCL+dosE9O/SR1Zcr0m R6e2qh/EXJXJfD06SmnHZQ42S49r5MNj/HgkgHGAWg1HAb8qs19rh1/buLLPI7OxZQsx uufQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=few5kL0JOkc3THFwp2ZJK3r9S/Gy0DCKiV6Ve6yiiu0=; b=upBFq7lk8ALbcdrTZovIbsGT4bJaNRna+3xr9sKFEj5aJy4SHMn9EK4FFyDjKQgxWM 8sYEIX1e3e+rlgcwa1PNw0PyuogArCjeO03lDNa1kaAUk6UNFV4HEuATX4RLc2Ina65I bqPjlNlmZwee8AkqKuVPx7ZMuD/++NOmg1B/MuUe36PYSldcmH/UXCRLTW+O0Ru7x7Hh s00E44ek7bU8tUfKplMB2oGmMDR8JGYJ0XwEd2CGFvPgbRIoftBat5niW6vf0tOUYEYZ JFiL3Ymc+koRKAb0Y/Jv6yF4dawwMVuVAjDCFV2tXQeZnIIA46TUC+pTch8D01Pmocud T3Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UckaBU3E; spf=pass (google.com: domain of richard.weiyang@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w8-v6sor1286260pgm.32.2018.08.23.06.07.57 for (Google Transport Security); Thu, 23 Aug 2018 06:07:57 -0700 (PDT) Received-SPF: pass (google.com: domain of richard.weiyang@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UckaBU3E; spf=pass (google.com: domain of richard.weiyang@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=few5kL0JOkc3THFwp2ZJK3r9S/Gy0DCKiV6Ve6yiiu0=; b=UckaBU3E/raodjKxvF7+tvhFLkcIw6CxeGinnUXnQMV5esZceHIkj1zzCbp4N6+a1l geo32WZYH+9dALLWn5Eh2w2QqY99HslTtzLrYpNEcx2yw8HRIh2zvqDOzJXEhmlEVrs7 dgwGrZm9uMtLw/iFU0FUOEk9O2HP1uwIisvMBOLSQDbio6DIKXbGIMhnnJ+sF0ch/GVc hLcDuYBOVwiTp0mNDvi0lTgQLZFy3TEdN8WlT0MgMmPujto2RY5aejjeYKXga7qjUf0v /o+9/++w1ReRq1QYPztpcuVY/S87HVT0xCRqX9/TxZ3BEE43gb9r33WcyXCj+p+tUb5V PrAQ== X-Google-Smtp-Source: ANB0VdYV+a7R+Asdai0elieJRQuM0/0Iv5wMnQjpDNbXj2z8eDpZMgkG4Us4XyX4dIRgg3MSMPTFYw== X-Received: by 2002:a63:5d1c:: with SMTP id r28-v6mr4636185pgb.445.1535029677076; Thu, 23 Aug 2018 06:07:57 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id j22-v6sm6360525pfh.45.2018.08.23.06.07.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 06:07:56 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, mhocko@suse.com, rientjes@google.com Cc: linux-mm@kvack.org, kirill.shutemov@linux.intel.com, bob.picco@hp.com, Wei Yang Subject: [PATCH 0/3] trivial code refine for sparsemem Date: Thu, 23 Aug 2018 21:07:29 +0800 Message-Id: <20180823130732.9489-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.15.1 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 Here is three trivial refine patches for sparsemem. Wei Yang (3): mm/sparse: add likely to mem_section[root] check in sparse_index_init() mm/sparse: expand the CONFIG_SPARSEMEM_EXTREME range in __nr_to_section() mm/sparse: use __highest_present_section_nr as the boundary for pfn check include/linux/mmzone.h | 6 +++--- mm/sparse.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-)