Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp126016img; Wed, 27 Feb 2019 18:19:26 -0800 (PST) X-Google-Smtp-Source: AHgI3IZHWaZzvGPTxqq8qwaMK12TZ4sLZFMZ7xnPkTL2dmCLMWLly+0abNv7PdkkPyRKBdfit5nI X-Received: by 2002:a17:902:20e9:: with SMTP id v38mr5302263plg.250.1551320366379; Wed, 27 Feb 2019 18:19:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551320366; cv=none; d=google.com; s=arc-20160816; b=d0Pfi27CpM9HmBQqCZrYVRkpSy14ZPP6SGdHmbSHWyT09aEfvWWBgPyteKl6FNInd1 3J0wD/AoLbU/mpHi3Ss6pP/LgfVipTOsmRkfA7BqJgsbh4KCoMz9HDomZ35QWfMD1+ON gnTfmGYf53MV81rJ79uEMQtN2nrz58Zxw2A8uXnO+V0wjnqCId1l6s5q8TBZAAqmVFx+ VG8eod8ZowItUu6bRohxNabXe1frRoZI2lhlgFbSMN0DtpWo5o9eHSIGh/E6etxVl05n b+aZTJ66dTXcJG5t669hqtyhbmbz408ojdPhmVK32kUKIvFe4eauRwlC2vSqCEzkiGQU s40A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ap32u9J2DjTEbnwK8tlI9EaVEAe0C092XmNehyAz4/8=; b=Ut3GNiFKGYhiUv+jAn5T5hFxSaWlC7JYmAKKmkcPhaI7j4h6Kg48VKIYvo2Ce+fuX7 JcM8QIZzZKaw7Z3mQwMAGssz/ntOoAer59CVi9lGAe+HX6s4mVsaKCYAJGvHDV9H7Gds Jrw2ooZf5DNTKQ6FInhhxjOs7eYhU2yALezT7Wr+Dv6x880BhW3svkxRSO+ocwcBu07K QisnPry/voPDDC1tIU8Auvpi6BsCg4tYGII9nebzsYaSfZLoTQSZkR/HJG86biLo751X eTX/FOnYjduhO3cC35SaF4+oIkhzJLBOMMzNfT8WIR2rVnyBlp1qERYBf821WVEpEu8S kT3g== 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 ci1si18026436plb.352.2019.02.27.18.19.10; Wed, 27 Feb 2019 18:19:26 -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 S1730678AbfB1CSs (ORCPT + 99 others); Wed, 27 Feb 2019 21:18:48 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:38889 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730240AbfB1CSq (ORCPT ); Wed, 27 Feb 2019 21:18:46 -0500 Received: by mail-qk1-f195.google.com with SMTP id p15so11197817qkl.5 for ; Wed, 27 Feb 2019 18:18:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ap32u9J2DjTEbnwK8tlI9EaVEAe0C092XmNehyAz4/8=; b=mEN4Let3Sqv0iA2JQoTjWRD0GB3konoMXmp7SoD3K4dPkHDnEQ2ugfw3gYe3vVzMGF i/Tbn/ShRkmoW2x/u+ekwhKrcTbqq9WkmBjkg6lkdRFrV3q6g+1eHs71tTvkKTkVxpFo ZIfD/Ry0UtfEGs4RHDMJ+ECmsfeELBGoBZ+xPfczcG8S8513P5qpLPopV5/m6ssnSk8E gLRDDxPmSWxSD7LaNRwWTn5gH5ZjTyLMqrKAeXK3V7wyFM+dTT3uO9ODs7S96SwngEvE wLYrQSUsuW8hYgdllMLr8JMYxYd9ulGGD2y6M3yrRbdxDGQpTk2HGo+SMQMZJYm0VHMS uuJg== X-Gm-Message-State: AHQUAuY3vNAHhQ9RrAxMjc2h5kLdbCwpNWEgQnyO4k3EtbrJr9gmZPJH XEB1stSPvny27LRwG6IPTYv9uCLkc9E= X-Received: by 2002:a37:61d3:: with SMTP id v202mr4658157qkb.217.1551320325029; Wed, 27 Feb 2019 18:18:45 -0800 (PST) Received: from localhost.localdomain (cpe-98-13-254-243.nyc.res.rr.com. [98.13.254.243]) by smtp.gmail.com with ESMTPSA id y21sm12048357qth.90.2019.02.27.18.18.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Feb 2019 18:18:43 -0800 (PST) From: Dennis Zhou To: Dennis Zhou , Tejun Heo , Christoph Lameter Cc: Vlad Buslov , kernel-team@fb.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/12] percpu: update free path with correct new free region Date: Wed, 27 Feb 2019 21:18:28 -0500 Message-Id: <20190228021839.55779-2-dennis@kernel.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20190228021839.55779-1-dennis@kernel.org> References: <20190228021839.55779-1-dennis@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When updating the chunk's contig_hint on the free path of a hint that does not touch the page boundaries, it was incorrectly using the starting offset of the free region and the block's contig_hint. This could lead to incorrect assumptions about fit given a size and better alignment of the start. Fix this by using (end - start) as this is only called when updating a hint within a block. Signed-off-by: Dennis Zhou --- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index db86282fd024..53bd79a617b1 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -871,7 +871,7 @@ static void pcpu_block_update_hint_free(struct pcpu_chunk *chunk, int bit_off, pcpu_chunk_refresh_hint(chunk); else pcpu_chunk_update(chunk, pcpu_block_off_to_off(s_index, start), - s_block->contig_hint); + end - start); } /** -- 2.17.1