From patchwork Tue Oct 12 18:01:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Weiner X-Patchwork-Id: 12553423 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 736F0C433F5 for ; Tue, 12 Oct 2021 18:02:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 27ADF60D07 for ; Tue, 12 Oct 2021 18:02:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 27ADF60D07 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 1778E94000C; Tue, 12 Oct 2021 14:01:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0FDE3940007; Tue, 12 Oct 2021 14:01:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EB74D94000C; Tue, 12 Oct 2021 14:01:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id DC764940007 for ; Tue, 12 Oct 2021 14:01:58 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 90C4F32637 for ; Tue, 12 Oct 2021 18:01:58 +0000 (UTC) X-FDA: 78688553916.25.8638F20 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by imf05.hostedemail.com (Postfix) with ESMTP id 484B6506F3EA for ; Tue, 12 Oct 2021 18:01:58 +0000 (UTC) Received: by mail-qt1-f175.google.com with SMTP id r17so129984qtx.10 for ; Tue, 12 Oct 2021 11:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J8ymrs8BqWOXJaCIl/vcEAutu2VS1jf5LIfnMpirIno=; b=api8DVz7bx2oVQ9f/ldYVg6zIqaVgDK7XC9AFr+oN86gJUIaU00fus2enBiUFdASXt 9z97UHOo927hwXvSGCqTP+3e5Iw95QOfW8fVJS/47yZSekiS0TdW1Pc8iMeEjE9Nuyi+ Pi7Cji+zNPmltNfU5w+6HHF8PdI6yIQH87MkiQcaOZGv0hjr7XPQJTkrU/cUMXhMKfef QEAQk/jeArS7E8NqSbtWRxnWH3BdQwv2AgQcrUsE4Tf1Yed9OouT6Kmah7HPNjLgsV3q vgMFftQyqsTPtygeQr5esj1j1xfCcPWCPKt1B4XgzkbuXHYcoYGGJN4TzKlfZ31yVoOd zTSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J8ymrs8BqWOXJaCIl/vcEAutu2VS1jf5LIfnMpirIno=; b=uw0GedPTLGGao5H3uKfvqIb4VNJW4Rb3/w52eb3YR087JWvc+3UDVe2EwVp7ehHaPl hjaZG653ky5sH5maoexorp/JMa0bj33qeDPTZzZvXJ7WteRI9dN73Xc4OUWCYCJgdrRs WLG7a35F2mWeQGSH8hozK850K4Jy0ejtluN5CGip6yXeyPTriNNwfb0bRder+T3JnkZB 3LAHM9zpOh/HgofPkm2eR5xUUSA+z8o2/XDbhtSuBZMYs+/803tpJWhTzABnLNsXM08S xqKgK1LkZWO52zYSR8Ur7X3q+BoqIiY0yy5xQYjGYj674LuoIHPBcxO17dYXbt3YQm/z 1QbQ== X-Gm-Message-State: AOAM531dg57BhE1heFqdwp5Q4s746brd4r7tHFNHYQXjj9HHgHPnmh9i MIZmSusdqa4kZBB8U0wDu/GxJg3+po4l7w== X-Google-Smtp-Source: ABdhPJwex0JUkya50iE19scsh2CAYyRUyxGrtV8kBBtZ1MSZyKRxk+YCwqYGdOyf580wHjeqTNFzFQ== X-Received: by 2002:ac8:1e10:: with SMTP id n16mr24325914qtl.86.1634061717671; Tue, 12 Oct 2021 11:01:57 -0700 (PDT) Received: from localhost (cpe-98-15-154-102.hvc.res.rr.com. [98.15.154.102]) by smtp.gmail.com with ESMTPSA id 6sm3417977qko.88.2021.10.12.11.01.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 11:01:57 -0700 (PDT) From: Johannes Weiner To: linux-mm@kvack.org Cc: Matthew Wilcox , Kent Overstreet , "Kirill A. Shutemov" , Vlastimil Babka , Michal Hocko , Roman Gushchin , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: [PATCH 06/11] PageSlab: eliminate unnecessary compound_head() call in mm/nommu Date: Tue, 12 Oct 2021 14:01:43 -0400 Message-Id: <20211012180148.1669685-7-hannes@cmpxchg.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211012180148.1669685-1-hannes@cmpxchg.org> References: <20211012180148.1669685-1-hannes@cmpxchg.org> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 484B6506F3EA X-Stat-Signature: yj1cqfdp7fmwoa5dz63sp8wa5tkcwndf Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=api8DVz7; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf05.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.175 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org X-HE-Tag: 1634061718-612238 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: The page comes from virt_to_head_page(). Signed-off-by: Johannes Weiner --- mm/nommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/nommu.c b/mm/nommu.c index c233126dd476..02d2427b8f9e 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -87,7 +87,7 @@ unsigned int kobjsize(const void *objp) * If the allocator sets PageSlab, we know the pointer came from * kmalloc(). */ - if (PageSlab(compound_head(page))) + if (PageSlab(page)) return ksize(objp); /*