Message ID | 20210217233547.93892-3-peterx@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=QuKr=HT=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93716C433E6 for <linux-mm@archiver.kernel.org>; Wed, 17 Feb 2021 23:35:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 38C98600EF for <linux-mm@archiver.kernel.org>; Wed, 17 Feb 2021 23:35:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38C98600EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3DB386B006C; Wed, 17 Feb 2021 18:35:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 313586B006E; Wed, 17 Feb 2021 18:35:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 18D7B6B0070; Wed, 17 Feb 2021 18:35:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0165.hostedemail.com [216.40.44.165]) by kanga.kvack.org (Postfix) with ESMTP id ED0FB6B006C for <linux-mm@kvack.org>; Wed, 17 Feb 2021 18:35:56 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BBA2E1E1A for <linux-mm@kvack.org>; Wed, 17 Feb 2021 23:35:56 +0000 (UTC) X-FDA: 77829369912.10.CD7EE08 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf17.hostedemail.com (Postfix) with ESMTP id 177AF407F8DF for <linux-mm@kvack.org>; Wed, 17 Feb 2021 23:35:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613604955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DOLBpO+jIc7m6kTzABHfMZhxUnbe7uQo4h61IVSpjcg=; b=OvL5+oGY2IjeIVaSXbH0Eo5pmJn2SLnvmwynLxYJPGdn/WNibHHi1YQ4IZM7tI+2HYQrss vU8llXlQL1YSK/r7Oawgk4TPukYoD/UtRkgTyeLuYAM5tkgFC0A0b129oAhwfIY9Agmrvg u1Y3vcJzTY7vsnDIsvjLENkl+C5jw+s= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-552-s92N21KJPN2xYncUDaENHw-1; Wed, 17 Feb 2021 18:35:54 -0500 X-MC-Unique: s92N21KJPN2xYncUDaENHw-1 Received: by mail-qk1-f199.google.com with SMTP id d66so129158qke.9 for <linux-mm@kvack.org>; Wed, 17 Feb 2021 15:35:54 -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:mime-version:content-transfer-encoding; bh=DOLBpO+jIc7m6kTzABHfMZhxUnbe7uQo4h61IVSpjcg=; b=PEXgSW/XiK/Sl2SZa4TCxattbWXsXgor0psXD+GFMzjmUp9UzgUAiIsa/x9ChppdPb 85Vic7U0gt/s4gIQL5eXX0cRVf8kE9k4WfWD62guutr+3DFBUZ5bfEX2xVGkck7Nq2yB zP15Ny/76A2vNferx42eYaRzfQU6kRbbhoAfMiaLACdfaCY4PRQpypDzcHvPuaA9OGGE YcuyJ11VsOabcJarRtvyLzmZbPqrTzXMKE3hTFT/yp/5AV6GCtMmG+7SbHnkKQ9nuBLp sousVYJxU/Ocfd+rbL1yrfBdIHSOUSvdIFi6+zYqpRtNRn13g3NN0Bo7nSsLoSIl3pGE Mo0g== X-Gm-Message-State: AOAM533sLD38pha9CiFaDd9yo3JZs7/f6exU9dY96wyJxrAiBb8XSGjb iJn6ve3XM6xtVyfxDmgBaZ5Nkiinebfz8dPks57qxI1PO6SjqGCnjGc6vIpUrdHeyPJTPbs33X4 auMK/Jaht+wbbWrfV0PXOz6SHgx/ymds03iIwW10avOFuoTp6JoDkLhgyJuEQ X-Received: by 2002:ac8:149a:: with SMTP id l26mr1755913qtj.210.1613604953503; Wed, 17 Feb 2021 15:35:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkPF9IdEx/0qho199ZELPwh7tKPt6adZyOrtuP5Au+UOQSOmMOTUV01IpIZiH6otG3JNuBHw== X-Received: by 2002:ac8:149a:: with SMTP id l26mr1755887qtj.210.1613604953196; Wed, 17 Feb 2021 15:35:53 -0800 (PST) Received: from xz-x1.redhat.com (bras-vprn-toroon474qw-lp130-20-174-93-89-182.dsl.bell.ca. [174.93.89.182]) by smtp.gmail.com with ESMTPSA id o5sm2739622qkh.59.2021.02.17.15.35.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 15:35:52 -0800 (PST) From: Peter Xu <peterx@redhat.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Gal Pressman <galpress@amazon.com>, Matthew Wilcox <willy@infradead.org>, Wei Zhang <wzam@amazon.com>, peterx@redhat.com, Mike Kravetz <mike.kravetz@oracle.com>, Mike Rapoport <rppt@linux.vnet.ibm.com>, Christoph Hellwig <hch@lst.de>, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, David Gibson <david@gibson.dropbear.id.au>, Jason Gunthorpe <jgg@ziepe.ca>, Jann Horn <jannh@google.com>, Kirill Tkhai <ktkhai@virtuozzo.com>, Kirill Shutemov <kirill@shutemov.name>, Miaohe Lin <linmiaohe@huawei.com>, Andrea Arcangeli <aarcange@redhat.com>, Jan Kara <jack@suse.cz> Subject: [PATCH v5 2/5] hugetlg: Break earlier in add_reservation_in_range() when we can Date: Wed, 17 Feb 2021 18:35:44 -0500 Message-Id: <20210217233547.93892-3-peterx@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210217233547.93892-1-peterx@redhat.com> References: <20210217233547.93892-1-peterx@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="US-ASCII" X-Stat-Signature: ogxh15foze8bank6csxxje8j43af1dy1 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 177AF407F8DF Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf17; identity=mailfrom; envelope-from="<peterx@redhat.com>"; helo=us-smtp-delivery-124.mimecast.com; client-ip=63.128.21.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1613604954-130166 Content-Transfer-Encoding: quoted-printable 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: <linux-mm.kvack.org> |
Series |
mm/hugetlb: Early cow on fork, and a few cleanups
|
expand
|
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index e302ed715839..2ba4ea4ab46e 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -387,7 +387,7 @@ static long add_reservation_in_range(struct resv_map *resv, long f, long t, /* When we find a region that starts beyond our range, we've * finished. */ - if (rg->from > t) + if (rg->from >= t) break; /* Add an entry for last_accounted_offset -> rg->from, and