From patchwork Tue Oct 12 18:01:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Weiner X-Patchwork-Id: 12553417 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 C0247C433FE for ; Tue, 12 Oct 2021 18:02:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 46A0F60D07 for ; Tue, 12 Oct 2021 18:02:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 46A0F60D07 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 5E2E9940009; Tue, 12 Oct 2021 14:01:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 590B5940007; Tue, 12 Oct 2021 14:01:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4311A940009; Tue, 12 Oct 2021 14:01:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 34E8C940007 for ; Tue, 12 Oct 2021 14:01:56 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E851C183E6016 for ; Tue, 12 Oct 2021 18:01:55 +0000 (UTC) X-FDA: 78688553790.21.40D2E0D Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by imf25.hostedemail.com (Postfix) with ESMTP id 95BE8B000187 for ; Tue, 12 Oct 2021 18:01:55 +0000 (UTC) Received: by mail-qk1-f171.google.com with SMTP id z40so18804451qko.7 for ; Tue, 12 Oct 2021 11:01:55 -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=0e0rL00kLadi2lyvM6hOzWlirSZ5oBt2j8X8F7bJZSM=; b=chQcxN4bRHoM7gj2TinQmcPE3Y4oJRxOkiEHEqowVxhCJo6D+Op8aYj8LkysJoHjDt Ayh2luHwOdYCu+ecHB4EonMFD7nG5YVFsuzIR1Non/doeQFyR3rwSnBvD2tgIX719L5D NtJIuo/6VjEkihK9V8OZrEvY7+8xrBHkeKCUeVFHJFwICJ0/U2v4UXYBhUBwo6I0W7t1 MrxJ0Bx8nlpqDdR6T2tOncI4YqW7cw53JU2/mObdD/bJBfEqeA6EihjNw5M/h991Zvgp r/mHE8Kxz8P9RbBBsKrnLUEyV6JbZInyDW84XQIr+1R9nW/jlR07K3uM55hJPtBeMTFB T0MA== 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=0e0rL00kLadi2lyvM6hOzWlirSZ5oBt2j8X8F7bJZSM=; b=7wuZtJdWyWePI9DkWc9cM42G38z2KCp2qVRr9JKQQABnwe3OQQBjVUaelB39FZyZFH lEVrVaGr2fs0rBY0RkA+7Q08E3JAlnsWfcoo+Z2wfGaSyBKonnjZ2SFXdb8cyqU0gK8e EU2dtc70CwGMlWq/F+zDKTgBEJO4P8k0ihD5HhqGuNpJ0o77o2gq3DvxBqUM6wNS29X2 AlAylOXWMQuOOqQqTDjZBeQTVJXMEZH971W06QnwX9yp3rC1rcx8pTLpAjuB9TK1xdEU 9UBdhDce1tQesI+SrD+1+mtCDlBlu769l6omBwmx2PcFZhcc8hhhfuZjHcNMBw4yGOb2 d4tg== X-Gm-Message-State: AOAM531xsIlwZ+azHT3xWDwDfEtzh6+qOy97Vi42VW3kX+tNqJmFpofH h+3o8Dh3GLscI6ZdPp59B/AY5IK8OkDv2g== X-Google-Smtp-Source: ABdhPJza8yelISHYV2A2JNlOPcudILx0Sa5Dcpdsaxzffy0q9fqNcu137J6I1K7iZBHRbBmYnVVrFw== X-Received: by 2002:a37:a041:: with SMTP id j62mr21265322qke.423.1634061714932; Tue, 12 Oct 2021 11:01:54 -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 a16sm5992748qkn.16.2021.10.12.11.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 11:01:54 -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 03/11] PageSlab: eliminate unnecessary compound_head() calls in kernel/resource Date: Tue, 12 Oct 2021 14:01:40 -0400 Message-Id: <20211012180148.1669685-4-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-Queue-Id: 95BE8B000187 X-Stat-Signature: 71cprw8cju4cgxuyutxyza3qmfyigeee Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=chQcxN4b; spf=pass (imf25.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.222.171 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org; dmarc=pass (policy=none) header.from=cmpxchg.org X-Rspamd-Server: rspam06 X-HE-Tag: 1634061715-835960 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: virt_to_head_page() implies it. Signed-off-by: Johannes Weiner --- kernel/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/resource.c b/kernel/resource.c index a363211fda99..ca9f5198a01f 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -151,7 +151,7 @@ static void free_resource(struct resource *res) if (!res) return; - if (!PageSlab(compound_head(virt_to_head_page(res)))) { + if (!PageSlab(virt_to_head_page(res))) { spin_lock(&bootmem_resource_lock); res->sibling = bootmem_resource_free; bootmem_resource_free = res;