From patchwork Mon Mar 4 10:33:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 10837573 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 CFBB913B5 for ; Mon, 4 Mar 2019 10:34:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCF8422A65 for ; Mon, 4 Mar 2019 10:34:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B124028DCE; Mon, 4 Mar 2019 10:34:00 +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,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 4910C22A65 for ; Mon, 4 Mar 2019 10:34:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E71838E0004; Mon, 4 Mar 2019 05:33:58 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E22168E0001; Mon, 4 Mar 2019 05:33:58 -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 C9D638E0004; Mon, 4 Mar 2019 05:33:58 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id 6F9B18E0001 for ; Mon, 4 Mar 2019 05:33:58 -0500 (EST) Received: by mail-ed1-f69.google.com with SMTP id m25so2436095edd.6 for ; Mon, 04 Mar 2019 02:33:58 -0800 (PST) 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:thread-topic :thread-index:date:message-id:references:in-reply-to:accept-language :content-language:content-transfer-encoding:mime-version; bh=/KM+MtVV1D34gBxCpxxnyDqGqHRLFY+ZFtpAF++e86o=; b=Yqoq+kk2Dgqj33DlSovvDxlOZqijPzahyxUpGPVC7Q+43oaFuZOTAhuya3otiYdp6h Ck212KvAtUQWZkoizvFqc6R32+lJhTwKQ6YlSiJx077AsmZIconFjp8mo9hiCOUZwQRn ELZ2M3x8uYhUXYCc69tNFmrNYsLfiux5rPrNyVQvien7m8JLLWoNymycGSS/aEqB/1+U eQcXngj9IhJ7doPYkPw15FxIdclxBGRITGI7IWKhuJflHfdJhRtb75WBMUDx8enlMgA4 MOS1ck+WUCetTGyLoI+EWSruTzxpay3YwsVDua1pZd8hcigCgUxyaCDOOd9/6GOMNG6t ucng== X-Gm-Message-State: APjAAAX/V/v2GI3PU9JnvKhoZkpwouhyTXs60fZIO6DfMTDjL5DvdcM0 06QG1k3voKHJMxmaWccSFIPwQZOvGOlR9u1rk9YT9yFdOyTp3+k88M9S+pe6LIhB2zMIywWEKkq z4VaviH7oNvPt2wqV+Q1XnGuXpLA8eMUC992oiWcqy45N/SwDUgc9DglFsslI7PaQ/Q== X-Received: by 2002:a50:d508:: with SMTP id u8mr15077837edi.51.1551695637987; Mon, 04 Mar 2019 02:33:57 -0800 (PST) X-Google-Smtp-Source: APXvYqz0nzE1GJSUxttw+zt4Op4Poe+PRGTHoIU3PHZWPR7TtRFHBsCsnQNfq/Q67vOjgE7V9oh8 X-Received: by 2002:a50:d508:: with SMTP id u8mr15077790edi.51.1551695637195; Mon, 04 Mar 2019 02:33:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551695637; cv=none; d=google.com; s=arc-20160816; b=uhKp7uUgMEtcMlEZUjXmGjhC3vti7K7ED1Lz8udMm0nPzH6mnRe4c83YBmbUeZjvwT m80LN4nl96u9bZGWgfQn4f+VcUvJvwa8teIS4rpWiudDWh/nHutcoWT2fYHTKDFAi9JO r/+WnH7bdYsYzOkBU+IsuFauH5Om3wNMmXNC1NmbNOD2qXYUxBbaLY84atBwqctcXCqn e3U3kCXTE82tmTNeIYD0SrrUor/emYHZLjJlIsAEeOUps33JPsRwAq5VWApfbrTvh4kU uei4eozpwjVrxIhL88Do/9Un/GTkWGtd+S+Vm19d8YQNHhcq86uBFTEBkQP7twg78gEF u/gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=/KM+MtVV1D34gBxCpxxnyDqGqHRLFY+ZFtpAF++e86o=; b=Bas3ZRUBsowmvdD2uEl78kbtYB7Yp6u2krSlLiFVLyaBp56ty3kyjaze3CtjDO9XYi 98TvTE1hKoEbTCV8b8v0WZO0haPESQoIs3B2sEckGk/9cO0XBes7yhsbCaMaWj3s7DFG 4slO+WdtA1vPRTmNTstc/vgwSuM5ZlZDm+ejMne1br2ZlwNA3cUM0F5PRxlNkseR98yp R22K5rfb4FMG+287Xm6ZIrjQc9LN9Ozy53XqRCWvEgU8BZe2ED0XpNZSpa4nZoMGe7fl FsAhXbYSIlXSRaBehZSPWu5prC9Xf9Q5M9TPoVP4VAAv+MIbsZ0VSBhqqLTzJaBThy2S 2zgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=bLI76z9U; spf=pass (google.com: domain of peng.fan@nxp.com designates 40.107.14.55 as permitted sender) smtp.mailfrom=peng.fan@nxp.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140055.outbound.protection.outlook.com. [40.107.14.55]) by mx.google.com with ESMTPS id t4si2138489eds.319.2019.03.04.02.33.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2019 02:33:57 -0800 (PST) Received-SPF: pass (google.com: domain of peng.fan@nxp.com designates 40.107.14.55 as permitted sender) client-ip=40.107.14.55; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=bLI76z9U; spf=pass (google.com: domain of peng.fan@nxp.com designates 40.107.14.55 as permitted sender) smtp.mailfrom=peng.fan@nxp.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/KM+MtVV1D34gBxCpxxnyDqGqHRLFY+ZFtpAF++e86o=; b=bLI76z9UPh2vjaHHuHksaAd/qx8WM/IFY8xUppsmhf+1Gc5olz1J6N5qbRwQZW9+vzE3PMIUpRcy0T+mNDD6EQ4N5SAamy1fnH+yeG62ZK7gtTyUzLpok8HJo12FaMYR7qD59HOcs9vS8kqVFumyJ7v/2JgyNLRuIc1MXDHiCwg= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5476.eurprd04.prod.outlook.com (20.178.115.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.16; Mon, 4 Mar 2019 10:33:55 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::a51f:134d:b530:f185]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::a51f:134d:b530:f185%5]) with mapi id 15.20.1665.019; Mon, 4 Mar 2019 10:33:55 +0000 From: Peng Fan To: "dennis@kernel.org" , "tj@kernel.org" , "cl@linux.com" CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "van.freenix@gmail.com" , Peng Fan Subject: [PATCH 2/2] percpu: pcpu_next_md_free_region: inclusive check for PCPU_BITMAP_BLOCK_BITS Thread-Topic: [PATCH 2/2] percpu: pcpu_next_md_free_region: inclusive check for PCPU_BITMAP_BLOCK_BITS Thread-Index: AQHU0nXEG16tPwZG4EKC+VpW/1eojw== Date: Mon, 4 Mar 2019 10:33:55 +0000 Message-ID: <20190304104541.25745-2-peng.fan@nxp.com> References: <20190304104541.25745-1-peng.fan@nxp.com> In-Reply-To: <20190304104541.25745-1-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.16.4 x-clientproxiedby: HK0PR04CA0001.apcprd04.prod.outlook.com (2603:1096:203:36::13) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 80740493-6a98-45d2-529b-08d6a08ce722 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB5476; x-ms-traffictypediagnostic: AM0PR04MB5476: x-ms-exchange-purlcount: 1 x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BAM0PR04MB5476=3B23=3AdR?= =?iso-8859-1?q?avUPOn/ZJMu8g2wvXPXFLkkCdOvT6B+YIPDapIbD+GY1fZsrSGSSOjtpcEay?= =?iso-8859-1?q?F9J46LiO9PKJzwlu23kzknBzDL0w0jcQ0M+I5pRlIb892VZtc9o51yAjIPfm?= =?iso-8859-1?q?IBxRJA0uPJL7LmSxmKGM02yMYff3kYZXYxGaugjjPmQmrlnvD6aZQjzM0R+a?= =?iso-8859-1?q?U8vhU6xD5CbmMO7HNWJ1Fh9PhZvxHUpB9nu5DxQdd0wxJSbwNInnXnaION4h?= =?iso-8859-1?q?vphMrd5Y1tDzlQq28uD5au7LRyAl7pPjn0Hp36qqQj6q5kyvKK0DswpInBPC?= =?iso-8859-1?q?WrvVbiwG4FXOcA8z8NNExK0E7MJlIeV90cjzKYSjcMyrqJ7lM7x79mkMToUj?= =?iso-8859-1?q?4AmiTKWyU3cjet+Sd36HuVii7+ulKjBd2DX0EjOZ1oBUDMVU8oY3ABZqbUpt?= =?iso-8859-1?q?J6Zg2q+ZfIE+IJBLaIEWCSkC0GhSBAbEmK3KEcWMBupb7lHs6sVw/1AhHvO/?= =?iso-8859-1?q?ZofJuAcZeXV3RqhA4ThzvDqgyUOc38rnWTysk/29iWwtMA32DK2zm0wySDcV?= =?iso-8859-1?q?/lPTOsN43e04VE3zMOvTPo1qAzRQI9XQsdDZ3aGj5rChXHyj0oZ7Ns4FB5TP?= =?iso-8859-1?q?hpL1WHrreLNJYIdItXf65cKxbRJpSxrEPuQTN/V3ww2+8XIx+bcX6owivrNl?= =?iso-8859-1?q?dgdCJFDrmodI+EaydaWYrLUBLDouNMpGyr2r29a901TZxrqfAK1cZQakdbdb?= =?iso-8859-1?q?MpmuAosRRbYk/o6X6d2oEPVY8xrlQ5Ao975VN1VAunZT8j6tZvnew9N78VUG?= =?iso-8859-1?q?FcEz6P/cKxdiej27The5w7JvU5JU+bBX8y+ftt/Xxa8ytr5DaUdFGfi7kABy?= =?iso-8859-1?q?IzzdUCa+xtWC/xou63cIAkfEjyyVknXAjS+wQC872x5LS37+PRgNxWw05/18?= =?iso-8859-1?q?asUCC8c3spQX+0fudHFoaehx5HE2j4JbinvHmA6tcdCAU8rCo9HCz8qO96qD?= =?iso-8859-1?q?5vSnWYQkazyLBxCzyYgI3WoNMJ8oc3SqUhmC5G5onbl1QVvgI/t/7NJbKFPK?= =?iso-8859-1?q?TB2wD1qChhzsiFhE7Iitn0+EyS0UKircEEAuDGcg6FVqorLBaKIyL43rTHSa?= =?iso-8859-1?q?yaCALe4mmXccqyYE1KFT0QOqJktUu3n3Fzc7KITqG/u3uy2ihwdep1fgzPwf?= =?iso-8859-1?q?naYW4b4N3h58AR1Q17xBDsNBXYieYj2MqGIKNJEC8WNMOG6hqVtZTxc+k04x?= =?iso-8859-1?q?D9JARRbE+T/VxK/9ABkdUYOTETentYS7zaRgKe9YPsl1zkxbx47WcxpHprg1?= =?iso-8859-1?q?uvRDG6fABGszW0duLXMwCMOIQc3f6BEuwxp3E4TUHY4PwA3xFuKrXkRoODZD?= =?iso-8859-1?q?K/76oAyxHn1BCaxSV/8ehP?= x-microsoft-antispam-prvs: x-forefront-prvs: 09669DB681 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(396003)(136003)(366004)(376002)(189003)(199004)(446003)(6512007)(6306002)(102836004)(186003)(2501003)(386003)(76176011)(6506007)(99286004)(71200400001)(71190400001)(4744005)(476003)(68736007)(36756003)(2906002)(1076003)(486006)(6436002)(5660300002)(11346002)(6486002)(66066001)(26005)(53936002)(2616005)(14444005)(256004)(44832011)(52116002)(106356001)(478600001)(7736002)(105586002)(25786009)(305945005)(4326008)(86362001)(97736004)(966005)(14454004)(8936002)(2201001)(316002)(50226002)(81166006)(81156014)(54906003)(110136005)(3846002)(6116002)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5476;H:AM0PR04MB4481.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: UfX2wIOmZPbHRqkW3BpATValWGvohh7I1J5b0CEz1H3me2AvHlQPeMzfwmuIkJxXUQs0iosnyLLtvcy0SNEV0i/nKJGHSPIhOLOMalPf7+Bb1DMNIF2p3UL4W/1Z1yXn97u4rSdhg5suEoAAvySNmiofvJTe8YxmUQRSjdGlGg5sUfgveHD+q188cdkpWK+yQf0YoeZLWgh+JMs71W0oMDvc/7t6xOD4OndObxuNZp6IjQwlZGV8ONNR3pgYpdeh7AqChvMXjvptM8tGIUKr4KJD+UodiqlU/CI9tkjDN4KpvznWEyphvTHjPTjabgqBw1rNSdzvbaSz5Jw5MfJLk93qUpB4Hdk9mnDhXFBFmIK/6bI3BlCL7Rjsn7bMp1Y7/yngq2IZQRfLBASMkfo8yON5iJkHpuWETS9ko3Ic1iQ= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 80740493-6a98-45d2-529b-08d6a08ce722 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Mar 2019 10:33:55.7829 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5476 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 If the block [contig_hint_start, contig_hint_start + contig_hint) matches block->right_free area, need use "<=", not "<". Signed-off-by: Peng Fan --- V1: Based on https://patchwork.kernel.org/cover/10832459/ applied linux-next boot test on qemu aarch64 mm/percpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index 5ee90fc34ea3..0f91f1d883c6 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -390,7 +390,8 @@ static void pcpu_next_md_free_region(struct pcpu_chunk *chunk, int *bit_off, */ *bits = block->contig_hint; if (*bits && block->contig_hint_start >= block_off && - *bits + block->contig_hint_start < PCPU_BITMAP_BLOCK_BITS) { + *bits + block->contig_hint_start <= + PCPU_BITMAP_BLOCK_BITS) { *bit_off = pcpu_block_off_to_off(i, block->contig_hint_start); return;