Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3323098ybv; Sat, 15 Feb 2020 17:30:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzj7JMBAbx9CQEhrqQO1u7aCUHCY7dl5nCnDH+bYcemkHVSQWICOjmnSMBLdHDA+kQ56uA1 X-Received: by 2002:aca:fc0c:: with SMTP id a12mr6097986oii.118.1581816624377; Sat, 15 Feb 2020 17:30:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581816624; cv=none; d=google.com; s=arc-20160816; b=bo5/atKMrGh7uVjoTWHOyZb4UZ1LJesnvpj8Vn1uOv3Rje9KO0Xxw50z2AP+utSu/Y glf5WLjRFUf1CMjTT15T0Vn/xZEdspmJ6/9LzMMhUUwoJ6m1aekInKd5zVQrdekDNuzx U7Ye/XNcBUx9BJ8E0MKpIPRYra5VGOj3D0FmbThK11T/DpWVlYuu6oQfyx9nl9NTMdfy 7RwxpvjNAs/8PX3dDisMndGIDyAABZ3+XA1doRDhqGDGbBJmaB5fiPoWA4e+nXaNJuPN RPpyo9OREr5SZpFivilHFQ1PfOqHHwCiUkJF4G2W9x5FGwXW97J2Fo5dUEqPSueMBz9v VI9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=H1J2XGmudHXtmp+DJfVLIIqWxd4GHWG0D55ayu8ofeI=; b=q8tJ0dIYDAFdOYp9jKsz4sY9GXMuxGqmiMpiM/KWcs5SgjTF3gOwr96MgWDsm3j4PH /RRktuHxRFlkpVncLn0lCb3CYEWYRJhAEL8Zx6YPZbB6NnMM7VcdUWNuCdZCkZAcuVJl 8Q4vTz6msxUw+WHzC2BF/PtPYpOUyDPLkY5x1cy8LcNcY5DxoT7o87Z57I+Xo1RHrqqN O7DpX3Cvu2tlrfXX3rBC7nglNOx8chMuRdbudWVcDI7KuqM5k+0TXujBVHYCMx+wi9OC qC8L9ObNLr1aV6+aSp8SYKFyAZbjufkaNHaLcaAk78RgvvN2QBW7ZVZobGf5DaBIgTUS sOpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gFq89J3C; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l83si4609581oih.58.2020.02.15.17.30.11; Sat, 15 Feb 2020 17:30:24 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=gFq89J3C; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727685AbgBPBaB (ORCPT + 99 others); Sat, 15 Feb 2020 20:30:01 -0500 Received: from mail-pj1-f66.google.com ([209.85.216.66]:36932 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbgBPBaB (ORCPT ); Sat, 15 Feb 2020 20:30:01 -0500 Received: by mail-pj1-f66.google.com with SMTP id m13so5676122pjb.2 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=NRN/VP7nflmsgB/fTCYndtKWdezwe4Sfg8d5elsnLV0ebWXbjdhq+hrtHOm2+DjAv1 xYlNsD5cjT7zf0CY94La6IjIDibWQKu0KQwPi70IBycZoKqrGtLtbDuNatjzG2cyV/lJ sUqBBs9tMF5v9D7WxqgYVqx4DlluSbJloqv1MbSXqtx92NCI3E+rQ6ifDVtzJludB3LM UOGBMt+xFB8/n7E5pih/cfN/ni5WBukc84ZFlzpVsKoO/wMLdOkE+mOH99TaK8qeUSRk zXvac7hT8oaPOfO/PQybKdj4iiFVgqL6HERW5r/3NFzoBEmWX7eIqaT7OtAQndl9xNcE Uiwg== X-Gm-Message-State: APjAAAXRvzoSUflZzne2IvQSJqhYkU/jtkHZ8lLbgWEqFWAz3vIpXHq3 bya39GmuoPmazE+E5+ZUNMl1/A== 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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