Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp746106pxf; Wed, 10 Mar 2021 17:07:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJx48bzq/Ld8wDqaDqkwRIKAGUCQ05M7DsN90wjtKv6FRtYiCMRaDcdGlMkFOxJxwEWK5jto X-Received: by 2002:a05:6402:12cf:: with SMTP id k15mr5888014edx.192.1615424839062; Wed, 10 Mar 2021 17:07:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615424839; cv=none; d=google.com; s=arc-20160816; b=vNP3qW6hgjl9ijDduO44uBdfP+GCXPix+rsAanQBMwUedn3kPjzi7SD04OgCxpS5aN kqRHiorVT8VDzv+zS/Uwqp6Le7c1mwSyGpAL6UCBEzZvKO0KQpHAOy3O102/lhnMEOeK Xol35ZjrjdXCjt8YZEpk7HbpU43irlKVWiVfRcUfTYiezjQJnBcndWI3qmCrb4JLjKfM qnKZISL3nxhWCIgNoxt7oM+WE9hCRWfmd0PFF1Iy3G1WjsmALjShqAGzDmoh/RItGCCt 6XRxjz9TewJV+NxHg5qvaOVVFLoaY2MK2LXfb3h216WnQwm63XPQFokVuxhUBSkbeJRI l3Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=tzLcpbEHlICK/TY3veXTxXrzL8MkHekFvgC0dEJ6xUY=; b=XfChnXLATfJm0NruxPoG1QYIZWCfkwwXgWRsPFkpc9+0/6CroPIC1AohZR8iXV3Pu+ KxurP1LUnHO9/jXdWNpyobSx3K/9PXnhbf1JKyPsEJFlpTdZ55AZe83sD9Crqxu004gn 1nb8WfFooYFWMRpyDfI8VfJ2Yd7pYy+v5TXTJVCee6cFVLHlMKX7g1ccgNs1jE/qbgBy z0EJYOXep4itjO+ycaAj3kmWaVbCS2n1EJ75dlREfbkOaHVW/GbDpJr/Qeyx7rNwNnnw pMt3cGM8UcZ8+3nUZdxYbGypCXPs0sroxpFTTEVOOyk9r29D7My0PixqdVyFJar+0qEE +VgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LZBOFnzl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si609552ejz.709.2021.03.10.17.06.55; Wed, 10 Mar 2021 17:07:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LZBOFnzl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229521AbhCKBGA (ORCPT + 99 others); Wed, 10 Mar 2021 20:06:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbhCKBFY (ORCPT ); Wed, 10 Mar 2021 20:05:24 -0500 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35239C061574; Wed, 10 Mar 2021 17:05:24 -0800 (PST) Received: by mail-il1-x131.google.com with SMTP id f10so17428686ilq.5; Wed, 10 Mar 2021 17:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=tzLcpbEHlICK/TY3veXTxXrzL8MkHekFvgC0dEJ6xUY=; b=LZBOFnzlnL8BCHZYy2gxCniNTx8DL20WUALibFUmm2iub0s76sHOMehyxztAiu90NF bo5viCGgzdHJFUlaV3nPaCd9YSTdXCl94XRILUQT4MbA9Hg1i2gFq7hjyk3TSkQXe5o0 0j+3IS/hp3G0YuU8WDvDjXyGSG5rL8sh1Ll4D6GtDa5UL/4ZPHcdbQl8VKPI8oP3SqNH NrIHlUMxzQKnjdH8POjHlTibZIMzz2EVlXcyhF6eKyqyuHl89tIZVkX46OnkDtBurmKa 6csBLXxCefF/9gYoCVFAsFDH2vd1+s3LXFi8gfDyse3VUc0JkBMLqUHIG9oh+LIzcoNt DA4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=tzLcpbEHlICK/TY3veXTxXrzL8MkHekFvgC0dEJ6xUY=; b=fw1ABzTUrANiafdG10Vwaki6Prn3OTH/00pyHqvkN67XV/HA1DzMKLsjTJJ8PKJS6G 2gs7Ov+Mu/nUJykPBOI5rIoAX323xuZ/KHNfEhJlucU7GqNQHZ9hPeVe0KOqOV29q8q0 p7Xn4WQwo9mmZJmVEc1Desk4gL/0ZvtPFdtkjxMPKgUqn8Iw8+5tix3bXHD7Naelyqlk Z+Mxulvhs6jk/2xkrJgXFS1HImBRME3Meb9SRLtIjof2kh1heXePZ3BinvADWNCOzrbQ EtXFobaXTt1w7j+vR6rd8PxDJkDQQCcckzCN0FgJRWMqrsLClVEvMcahZGvQQz0UW9JU L/nA== X-Gm-Message-State: AOAM531v/hVJlRNuKvc1gvmWcDYH1d2KvxgGIrBxgswcknzXpnPI+nOk KI+mCqewnToKC5V69fUECIOm1FPGUiFil6puDGA= X-Received: by 2002:a92:c04b:: with SMTP id o11mr4720645ilf.42.1615424723613; Wed, 10 Mar 2021 17:05:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Alexander Duyck Date: Wed, 10 Mar 2021 17:05:12 -0800 Message-ID: Subject: Re: [PATCH v17 1/9] mm: Adjust shuffle code to allow for future coalescing To: "Bodeddula, Balasubramaniam" Cc: "aarcange@redhat.com" , "akpm@linux-foundation.org" , "alexander.h.duyck@linux.intel.com" , "dan.j.williams@intel.com" , "dave.hansen@intel.com" , "david@redhat.com" , "konrad.wilk@oracle.com" , "kvm@vger.kernel.org" , "lcapitulino@redhat.com" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "mgorman@techsingularity.net" , "mhocko@kernel.org" , "mst@redhat.com" , "nitesh@redhat.com" , "osalvador@suse.de" , "pagupta@redhat.com" , "pbonzini@redhat.com" , "riel@surriel.com" , "vbabka@suse.cz" , "wei.w.wang@intel.com" , "willy@infradead.org" , "yang.zhang.wz@gmail.com" , "Graf (AWS), Alexander" , "Herrenschmidt, Benjamin" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bala, There was a similar effort several months ago that was trying to do this in conjunction with pre-zeroing of pages. I suspect if you wanted to you could probably pick up some of their patch set and work with that. It can be found at: https://www.spinics.net/lists/linux-mm/msg239735.html Thanks. - Alex On Tue, Mar 9, 2021 at 12:13 AM Bodeddula, Balasubramaniam wrote: > > Hi Alexander, > > > > My team was evaluating FPR and observed that these patches don=E2=80=99t = report memory for deallocated hugeapages directly and need to cycle through= buddy allocator. For example, say we need to allocate a maximum of 12 * 1G= hugepages (by setting nr_hugepages), use 8 * 1G hugepages, and then deallo= cate 4 * 1G hugepages. Unlike regular 4K pages, this 4G worth of memory wil= l not be reported until we set nr_hugepages to 8 (wait sometime(?) for FPR = to do its work) and set it back again to 12. While this works fine in theor= y, in practice, setting nr_hugepages to 12 could fail too due to fragmenta= tion (this could depend on other processes memory usage behavior). > > > > If FPR could report this free memory without cycling through buddy alloca= tor, it makes the solution more robust. I am looking for advice on how feas= ible this approach is and what would be the effort for building this functi= onality. In general, if there are other thoughts on how we can address this= , please do let me know. > > > > Thanks, > > bala