From patchwork Thu Jun 20 21:29:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13706415 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 39BD9C27C79 for ; Thu, 20 Jun 2024 21:29:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 73BF48D00E7; Thu, 20 Jun 2024 17:29:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C3BF8D00D5; Thu, 20 Jun 2024 17:29:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5407C8D00E7; Thu, 20 Jun 2024 17:29:46 -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 2F7A78D00D5 for ; Thu, 20 Jun 2024 17:29:46 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A922DC062B for ; Thu, 20 Jun 2024 21:29:45 +0000 (UTC) X-FDA: 82252559130.25.846CD42 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf24.hostedemail.com (Postfix) with ESMTP id 00A29180013 for ; Thu, 20 Jun 2024 21:29:43 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WdPzgKQ+; spf=pass (imf24.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718918971; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=HF79DDQtv0PLe7b6WwHL/CJcYBqjxqUaW/gWbVu1+DQ=; b=P34nzF1o4QsV9Tf8K+Bs25kcmhLK6dC+555SHx1Ka1lkirETXII/b3mvPpnol5hpbzz3fz JmZWSkqvIzEIXm0HGzxa5Mp9GrEvOj1k6TWkbkwm40IrTCfBehe5cTUDQJPHFMyEbpdg/n AbARBWGn3dw3bakvXLLfL/GAPKT7lYA= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WdPzgKQ+; spf=pass (imf24.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718918971; a=rsa-sha256; cv=none; b=LKLHAwmcUJ46qlLc6LNMGICNGmHdvKLcA8A/94o6VomSDTDSTby8osmCC9R4fVNj8Xdzph LYgkxXtZiQ103W1DvQ+CvkcLJXmNBHou/otPayLCZWENwlRCQQ1VEggJkDgziCy0NXq7TA 7HRMuT2nynyPOyfbYUyXyPrQJNxmAu0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718918983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HF79DDQtv0PLe7b6WwHL/CJcYBqjxqUaW/gWbVu1+DQ=; b=WdPzgKQ+D41D7zT+d5RbOzE13aVy69DLWSKig+eiexc+PyLJ6TOIjvEVHUKRoxyPUssXAT 1qyoNgQVyM0SOV1gmVquRhbvWp0uEanUDgezMUDamGOM/eVwCW4iAcs2r9TUTPQPIGRoDE zxYkDUyux+MpwTcZbLraqJjORok3aKY= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-PvgNEFPgM7a1bnwCnBVSqg-1; Thu, 20 Jun 2024 17:29:39 -0400 X-MC-Unique: PvgNEFPgM7a1bnwCnBVSqg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B475919560B4; Thu, 20 Jun 2024 21:29:38 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.192.54]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C98F419560AF; Thu, 20 Jun 2024 21:29:36 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton Subject: [PATCH v1 0/2] mm/migrate: move NUMA hinting fault folio isolation + checks under PTL Date: Thu, 20 Jun 2024 23:29:33 +0200 Message-ID: <20240620212935.656243-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 00A29180013 X-Stat-Signature: 64ffyatbsh4q71unscpi8ciy3tjgzxic X-Rspam-User: X-HE-Tag: 1718918983-351605 X-HE-Meta: U2FsdGVkX19r4hFptUgoH/KCop+hMTD15yKf56v0txOUUIS54F0EMYmL/JXNZRDPzW7FX+bN1g/A7ldywagQrRiNNpsOYDHJVACpaLDg0E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drkSK926dEA9rhztlY6HGx1oMiXIxKNetBHsaFqLq1NuKIyVkiiPXkrIuibZgJ6ZJ8oZp0/cGxkb4oN2hkg31jL65kxTZriTRzPPTkFMsZblB5nYx9SVJYoWjiJS9P8= 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: Working on moving some mapcount related checks -- especially folio_likely_mapped_shared() invocations -- under the PTL, where we are sure the folio will remain mapped and the consequently the values are actually expressive in current MM context, there are not that many problematic bits to sort out. This series tackles the NUMA hinting fault handling: we now perform checks and folio isolation under PTL with the nice side effect that we have to take less temporary folio references. Did a quick test on a 2 socket system, NUMA hinting+migration on PTEs and PMDs seems to continue working as expected. Cc: Andrew Morton David Hildenbrand (2): mm/migrate: make migrate_misplaced_folio() return 0 on success mm/migrate: move NUMA hinting fault folio isolation + checks under PTL include/linux/migrate.h | 7 ++++ mm/huge_memory.c | 13 ++++--- mm/memory.c | 11 +++--- mm/migrate.c | 81 +++++++++++++++++++---------------------- 4 files changed, 58 insertions(+), 54 deletions(-) base-commit: a53138cdbe3ea8875405e96fa9cde64e24f4f9e1