From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CBE020E328 for ; Fri, 10 Jan 2025 13:37:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736516240; cv=none; b=es64uKkp3LNATlMO6JHV9fbi+AZwdDnWr/689BGY18rHvTNC3arglld0UQz+eqkLKgqLv9DLoU4soNxUjnjPGFyElvC11keDilqK9Rmtq05wupSkgJjiVR1TID3AlENPVqEn0Qs1+0uIm2huzjzqh83XOCFhed0v2Ago34DfvBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736516240; c=relaxed/simple; bh=S08lOuU2YTQ474+X12plRyhgclqkcpTZ8hWFjKfQeK0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nVkOe+F050Ekkxurt2TAowJ7Fru26DNKcsAIuP/w6Mme0ZlN9rrdy+nlJTlQMSgL1eRDhg/KGVdOoIlx2VQUrfqK20bFRTKR1i4dhFqlhxUQhX3fwrklxRhIW5IqoWfKbT0CLT6VmRq2HLuK2wlB8W1Wrpc8iGXs4Kz1azxvC5Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 127FA1477; Fri, 10 Jan 2025 05:37:46 -0800 (PST) Received: from [10.50.66.95] (PW040MKD.arm.com [10.50.66.95]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 84F523F66E; Fri, 10 Jan 2025 05:37:01 -0800 (PST) Message-ID: Date: Fri, 10 Jan 2025 19:06:55 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 09/11] khugepaged: add mTHP support To: Nico Pache , linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: ryan.roberts@arm.com, anshuman.khandual@arm.com, catalin.marinas@arm.com, cl@gentwo.org, vbabka@suse.cz, mhocko@suse.com, apopple@nvidia.com, dave.hansen@linux.intel.com, will@kernel.org, baohua@kernel.org, jack@suse.cz, srivatsa@csail.mit.edu, haowenchao22@gmail.com, hughd@google.com, aneesh.kumar@kernel.org, yang@os.amperecomputing.com, peterx@redhat.com, ioworker0@gmail.com, wangkefeng.wang@huawei.com, ziy@nvidia.com, jglisse@google.com, surenb@google.com, vishal.moola@gmail.com, zokeefe@google.com, zhengqi.arch@bytedance.com, jhubbard@nvidia.com, 21cnbao@gmail.com, willy@infradead.org, kirill.shutemov@linux.intel.com, david@redhat.com, aarcange@redhat.com, raquini@redhat.com, sunnanyong@huawei.com, usamaarif642@gmail.com, audra@redhat.com, akpm@linux-foundation.org References: <20250108233128.14484-1-npache@redhat.com> <20250108233128.14484-10-npache@redhat.com> Content-Language: en-US From: Dev Jain In-Reply-To: <20250108233128.14484-10-npache@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 09/01/25 5:01 am, Nico Pache wrote: > Introduce the ability for khugepaged to collapse to different mTHP sizes. > While scanning a PMD range for potential hugepage collapse, track pages > in MIN_MTHP_ORDER chunks. Each bit represents a fully utilized region of > order MIN_MTHP_ORDER ptes. > > With this bitmap we can determine which mTHP sizes would be the most > efficient to collapse to if the PMD collapse is not suitible. > > Signed-off-by: Nico Pache For the actual bitmap optimization: give me some time, I'll get back to you.