From patchwork Fri Oct 18 09:41:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dev Jain X-Patchwork-Id: 13841472 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 436F2D2FFE0 for ; Fri, 18 Oct 2024 09:42:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D04586B0095; Fri, 18 Oct 2024 05:42:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CB4696B0096; Fri, 18 Oct 2024 05:42:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA2E96B0098; Fri, 18 Oct 2024 05:42:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9D5296B0095 for ; Fri, 18 Oct 2024 05:42:11 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1AD141C75CE for ; Fri, 18 Oct 2024 09:41:57 +0000 (UTC) X-FDA: 82686231726.12.35DCE36 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf10.hostedemail.com (Postfix) with ESMTP id E0C7CC0011 for ; Fri, 18 Oct 2024 09:42:03 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf10.hostedemail.com: domain of dev.jain@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=dev.jain@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729244383; 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; bh=DlWWvn76/6hkbKmlvRIWYMEsmSWiBdCLTnED3RraqZM=; b=b8HoqewfVOZ6fN+oFuhYSuixjBDmJmsiB9MJZDZeG3Xh6Fr8EETN7DbUmNnBrmjWAj0d8T oBDEr/nxVhIxcYnZaGn55Xmgn60weCXGs95/2t5UbDrodUE0rVR2znDCL0Uim8qd/Nv0sm JpOz33ik8Qc1aXC3QoUSQ9vOLyiQcno= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729244383; a=rsa-sha256; cv=none; b=tkfmfGVpIAFlDoaTvIBD7htwD0t+XcODQFYMNBCVr7gHBfqspN/oGlXVj++z0X/EyqacMk JrCiBa36TeHoYlWbKvqYVfUhmLLB5P7OWyCjYStwxg0mspyxS2eVjmclOnuqIDRKHpAYLS H0CHSvCrOilGCgTqUJZ2qVwQrz634eg= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf10.hostedemail.com: domain of dev.jain@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=dev.jain@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 67F11FEC; Fri, 18 Oct 2024 02:42:37 -0700 (PDT) Received: from K4MQJ0H1H2.arm.com (unknown [10.163.66.210]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7624E3F58B; Fri, 18 Oct 2024 02:42:04 -0700 (PDT) From: Dev Jain To: akpm@linux-foundation.org, david@redhat.com, willy@infradead.org Cc: ziy@nvidia.com, ying.huang@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dev Jain Subject: [PATCH] mm: Remove redundant condition for THP folio Date: Fri, 18 Oct 2024 15:11:51 +0530 Message-Id: <20241018094151.3458-1-dev.jain@arm.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) MIME-Version: 1.0 X-Rspamd-Queue-Id: E0C7CC0011 X-Stat-Signature: 4f6g3596a78f1o9h6fefstoenryfzxmh X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1729244523-365437 X-HE-Meta: U2FsdGVkX19F9eG1qJK5KWNW7ftQnrlUa1oeF+FZb3cAyQLpcWP/yfsMK+WRx1ztbImLML3zA7ROXOlS00PUggm1ioLj/7fVlEYpZsG5Riwh9E9reO4Uc5E4DAQcKjWC50EUhG7o0F771wUabB369ivsI4XGwZS7XT518bU17+ltFpNBt25kkIM6rh5nvQeulwMK4sca16EU7b/QxtIH+d3kBikfcv1s73uw2C+HskX6xFyyxbWUy+EZVOFh9+U6M9c3H9uW37uttnTetS0soY2xwPnu+l6aaeXzpczOkAEHJREzOx6U+Tj/eykWwOO3ILiRYQZIZmj5hQuaue6tP23lc9ZZbcVRJIWy6hEYGTRnEsUGuVxjewkAY/Zzqjm0fCR8JKhVbMBeK6VF7CRBZOJPtBVpVmZEG4a6/+ISdlrPToOSt/Fj3fXANJQI517yT2dcQJc44P0RaYOAz/I+YK9IQECp/ApGe4AnrndrYXOyddTpdk7bGbx7wm7L1HbwV/5jwo+eXXL7lK67g3vc1K0a8LrUfL+SLrxINT89u1uRNjC9a/k+ft+PCoC98N4GooJAoOElWTmKVBAB/eKVTgW3i92T8xUnYL/qu4HCbtAYFcDuFzjX6RpFdLTvB/xpisp9FJ1smPIZjXM/jACt7hr59sBYUFJ+NKiT6V926bEdvsYG+FIvffEwVlLOnQc81Vk9aySpHIbJv8I3HDubpBPyuhuWQP1aiP9OgNXRDXLBu0SwniFs5HKNbJx5X3YcjMXNrXKBO5nKV9el78t02CqRQuHfEOdKx/4hI3J3OfvlK9LshdFC9RldedLera4xJDipNyAfm+hb+wP8gm1BTICbDuynpFAXP0gzyeLYlpvYmU7/CnXHsT7ElB7zmhzfK1Zl5dRZ5qThETYpkBOz5R6Dkmfz6VX92E8cuL0aLj7xHcg5E65FEQwTjVTWPNYCHaYlaMHS/5IuFggyuw1 1NL7bwkD eRsfqk2aGoYgbGvb/nALxinYMdcurjDTjtY0C/9Y3OtezKaVTupHo2eLKMIr0yhJmc22tFNmtqXva3VgEP0GWMhqvXj6rUc+89M0EsocB81sq45jz5jOjp9z7PQtXvTJAsBozK+9qMaA00+NicoFUeTc6aQ== 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: folio_test_pmd_mappable() implies folio_test_large(), therefore, simplify the expression for is_thp. Signed-off-by: Dev Jain Reviewed-by: Matthew Wilcox (Oracle) Acked-by: David Hildenbrand Reviewed-by: Anshuman Khandual --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/migrate.c b/mm/migrate.c index df91248755e4..b43e7b105559 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1731,7 +1731,7 @@ static int migrate_pages_batch(struct list_head *from, list_for_each_entry_safe(folio, folio2, from, lru) { is_large = folio_test_large(folio); - is_thp = is_large && folio_test_pmd_mappable(folio); + is_thp = folio_test_pmd_mappable(folio); nr_pages = folio_nr_pages(folio); cond_resched();