From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-12.9 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL 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 DEC21C7619A for ; Sun, 16 Feb 2020 01:30:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A26C324677 for ; Sun, 16 Feb 2020 01:30:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="gFq89J3C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A26C324677 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4D4A96B000A; Sat, 15 Feb 2020 20:30:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 485736B000C; Sat, 15 Feb 2020 20:30:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C2046B000D; Sat, 15 Feb 2020 20:30:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0087.hostedemail.com [216.40.44.87]) by kanga.kvack.org (Postfix) with ESMTP id 23B226B000A for ; Sat, 15 Feb 2020 20:30:03 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A29514DB5 for ; Sun, 16 Feb 2020 01:30:02 +0000 (UTC) X-FDA: 76494259044.20.glass98_579c521f6773c X-HE-Tag: glass98_579c521f6773c X-Filterd-Recvd-Size: 4127 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Sun, 16 Feb 2020 01:30:01 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id gv17so5673534pjb.1 for ; Sat, 15 Feb 2020 17:30:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=H1J2XGmudHXtmp+DJfVLIIqWxd4GHWG0D55ayu8ofeI=; b=gFq89J3C6y2E3dC6eJosGCejVHswqtg68Tow44UbrH2gVrpogK7qFB1KHIIqqUr7bn tF6i1gknCrbwVMRuZQ5ME8rn/UmTXJDDfhHRV6pW2PIY5pqan+jFUw+/kb92UAgwLVbj T/G17QADHWbAVrR3b1QVTsvF3ed/aWsXDnw5zV2uSZHZk/45sRr34UPnEUrZgMEdy6J6 YqeWVAyXZWILuihYlGoDPXdNP++ifAKU+tFKpgmi8EBlQR2AX2NbhCSBXI96xRW5tjuA ImAmKQCewP/SSbyC0hOD2KKx7/xtU+uyWnFN+4DYSnSZDjveEXzbpjxCsl1eW+3zXMKv iahQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=H1J2XGmudHXtmp+DJfVLIIqWxd4GHWG0D55ayu8ofeI=; b=HZWqMK23DKlHWsacFZIvQYjxXLrcH/IfFQPreIGGAYShBHeHsVI/m792XoKm7Pfa6x 0deHL/8so1liO8ZIjQN7DSjZi4QYrtzQ5w8N7ZB1Lf33d4P7HhZEqdJbB1alXJQvngEE /pIltGZLX6KvCA+8prK1rA9X1Th8jXzhXDneaaAdhTzD1o1g8zlL1KPfOGZG7tHQncFJ 29B78XsG9YVJct2R+Dp6WJe6YDq7bSwqDuRIA6t0KjThOnRm1+VcYI5o9hzAXBlxHKSU OjVwyutjWQlsHBisTDdTkvso01h+yS79jgpfvxQSu7Nr7/iV8pgI1OnZk9+teO8Pthel W0Sw== X-Gm-Message-State: APjAAAU9eBHbl+QOXBf5XRtD38F4HuX479OcIDQRoDZkunTroUvQxIPK 55SdsrYkLv5hItakidyp3NeoQg== X-Google-Smtp-Source: APXvYqyGFRjjGux2Y1Zo0z/8WLWOp+BzYnoiWnfZ6OCKzLnyPcaJCc5ufv5eAEVQKL1cq60yEjgu4Q== X-Received: by 2002:a17:902:407:: with SMTP id 7mr9683676ple.226.1581816600814; Sat, 15 Feb 2020 17:30:00 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id f3sm12207242pga.38.2020.02.15.17.30.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2020 17:30:00 -0800 (PST) Date: Sat, 15 Feb 2020 17:29:59 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Mina Almasry cc: mike.kravetz@oracle.com, shuah@kernel.org, shakeelb@google.com, gthelen@google.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH v12 7/9] hugetlb: support file_region coalescing again In-Reply-To: <20200211213128.73302-7-almasrymina@google.com> Message-ID: References: <20200211213128.73302-1-almasrymina@google.com> <20200211213128.73302-7-almasrymina@google.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: On Tue, 11 Feb 2020, Mina Almasry wrote: > An earlier patch in this series disabled file_region coalescing in order > to hang the hugetlb_cgroup uncharge info on the file_region entries. > > This patch re-adds support for coalescing of file_region entries. > Essentially everytime we add an entry, we call a recursive function that > tries to coalesce the added region with the regions next to it. The > worst case call depth for this function is 3: one to coalesce with the > region next to it, one to coalesce to the region prev, and one to reach > the base case. > > This is an important performance optimization as private mappings add > their entries page by page, and we could incur big performance costs for > large mappings with lots of file_region entries in their resv_map. > > Signed-off-by: Mina Almasry Acked-by: David Rientjes