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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4991FC27C53 for ; Thu, 20 Jun 2024 01:36:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ABC8A6B032D; Wed, 19 Jun 2024 21:36:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A6C1F6B032F; Wed, 19 Jun 2024 21:36:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 919446B0331; Wed, 19 Jun 2024 21:36:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 70D4E6B032D for ; Wed, 19 Jun 2024 21:36:14 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E87E51616A4 for ; Thu, 20 Jun 2024 01:36:13 +0000 (UTC) X-FDA: 82249551426.02.CAAE2D7 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by imf22.hostedemail.com (Postfix) with ESMTP id B83EBC000B for ; Thu, 20 Jun 2024 01:36:10 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ElVYUtxG; spf=pass (imf22.hostedemail.com: domain of ying.huang@intel.com designates 192.198.163.17 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718847364; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7WLtTbTiQxP3pVefIbzu0qRlP/Qvi9SkXn1sQnZvSkU=; b=EAlQo0ryZpQEiz/jYYevZx1iw5W5J2753X/IKOzvcoHpieUEkPkpc78QWhOMQBjfL+e3dv r35xSAXPzCXFcoYDk9Ste99x9aDlKxSVbK2kFFTroD+qA+NcES4uYODlXnJA6T+WZLQcZ/ 4SJBWroenotwCPQ4bIxNKMmN/TTqgMI= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ElVYUtxG; spf=pass (imf22.hostedemail.com: domain of ying.huang@intel.com designates 192.198.163.17 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718847364; a=rsa-sha256; cv=none; b=P1hBpJ2kQ73ozIJKKzcksh1SYLFV17iDYTDlbEu0+rO2KrnnRughJOV5aRYDpnUVivK8z1 P07GOn2uI2R4kFBWP6IGbr+C3D2Da1dJyO1GBX/hWzv2OfWdZo8AGmXnQ7xvo+bNnAiboo a2fkMVvxEtfc4KWZzqyiLiAJTp6UO/g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718847371; x=1750383371; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=MuG3tWGGG/ler89LdEK2mUf9s2KAAV+LwtcF+zUbd0Y=; b=ElVYUtxG65ViA8/TsnnKcgUVfCG1YG8J4HV0Wt0hBp3LhOSkwFx4AlFk p5Z9sFJVdoWUCp3RubEh0jdvKyTByT51FLOig0nVY2eC2jIwSm8zEOXVF DVqPkUYxjZGAi+LQAr/PxnJeYDtDzXl9HtL0P8rtG4CzgR7SoA+oBEVsx AHIMPTbedVPo2Ik0s6FIK7+s4CZ08St0LDkKDYBWmtW4mGKVhY8KOAd3D VDkIBmJLnbAqcUthexaAiHEfU4RTaL6oFABZ1gfnajAf39+670KoDClHS RE7RQZfptRT7nHFmSC0ajwQtbXSODnBiEhKoSEXVELjBNt9sX8LGeyXng g==; X-CSE-ConnectionGUID: okC60jYNQ4mOh1zDW+9wyg== X-CSE-MsgGUID: wHEjbEO4QX6ac8Zp/SdPbQ== X-IronPort-AV: E=McAfee;i="6700,10204,11108"; a="15678722" X-IronPort-AV: E=Sophos;i="6.08,251,1712646000"; d="scan'208";a="15678722" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2024 18:36:09 -0700 X-CSE-ConnectionGUID: oumdNgg9SeCa/IreWlo+eA== X-CSE-MsgGUID: WfMEbfbMTEmCMTYOebg9iA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,251,1712646000"; d="scan'208";a="46996389" Received: from unknown (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2024 18:36:06 -0700 From: "Huang, Ying" To: Ryan Roberts Cc: Andrew Morton , Chris Li , Kairui Song , "Kalesh Singh" , Barry Song , Hugh Dickins , David Hildenbrand , , Subject: Re: [RFC PATCH v1 0/5] Alternative mTHP swap allocator improvements In-Reply-To: (Ryan Roberts's message of "Wed, 19 Jun 2024 10:17:08 +0100") References: <20240618232648.4090299-1-ryan.roberts@arm.com> <87tthp4cx9.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Thu, 20 Jun 2024 09:34:15 +0800 Message-ID: <878qz04ctk.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Stat-Signature: t6jodz8aru7n8r7jhik7j111xxm6sd3k X-Rspam-User: X-Rspamd-Queue-Id: B83EBC000B X-Rspamd-Server: rspam02 X-HE-Tag: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LlkeMG5oM2bS7odmz7WJzAt7RK6yqlv5ziS9DDT9iLxWBerGoqdJt5sPn5mkAPEQ/iPtEauGVYuoSi/JEqCOR/3D86fJiyjLCfP+RuK4GglAcT6Zja8d/29vPHfD1Kk3ZDFET9ghLEOs= 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: List-Subscribe: List-Unsubscribe: Ryan Roberts writes: > On 19/06/2024 08:19, Huang, Ying wrote: >> Hi, Ryan, >> >> Ryan Roberts writes: >> >>> Hi All, >>> >>> Chris has been doing great work at [1] to clean up my mess in the mTHP swap >>> entry allocator. >> >> I don't think the original behavior is something like mess. It's just >> the first step in the correct direction. It's straightforward and >> obviously correctly. Then, we can optimize it step by step with data to >> justify the increased complexity. > > OK, perhaps I was over-egging it by calling it a "mess". What you're describing > was my initial opinion too, but I saw Andrew complaining that we shouldn't be > merging a feature if it doesn't work. I don't think it doesn't work. It just works well for some workloads, but doesn't work well for some other workloads. We can always improve the implementation to make it works better for more workloads. >From another point of view, even with your and Chris's improvement, mTHP swap entry allocation will fallback for quite some workloads. Use page allocator as an example. Even in current kernel, THP allocation may fallback for quite some workloads because of page fragmentation. But I don't think THP doesn't work now. > This series fixes the problem in a minimal > way - if you ignore the last patch, which is really is just a performance > optimization and could be dropped. > > If we can ultimately get Chris's series to 0% fallback like this one, and > everyone is happy with the current state for v6.10, then agreed - let's > concentrate on Chris's series for v6.11. [snip] -- Best Regards, Huang, Ying