Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp286683pxm; Wed, 2 Mar 2022 15:28:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZPeBb+LxhEry1FRIrGV8cz4IwptOkfazbDsQvSv92HafoWT57o++U1h1qauSPFEaHCKWB X-Received: by 2002:a17:902:c408:b0:14f:d100:a70d with SMTP id k8-20020a170902c40800b0014fd100a70dmr32602038plk.146.1646263714171; Wed, 02 Mar 2022 15:28:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646263714; cv=none; d=google.com; s=arc-20160816; b=T+WjcvfyfApRbE+9FXlVzlY55yFFjI6PUudTSv80astAhzzo8KqX3zQw83dnFi3+Lm 7e0SxoQwKuQYBibkef+DlxBaPwfz3NtMP9F2o8WUBG4qknpU8SB40KZLoPrE7sKKuzGn Q2oeWIjIQN7tJh/6ROwQMeKeJtoLi69binQA2pNeaZ66ZAhhJnOG8ya9Eyl/O4bRc9E8 zUq841pdSpgvh7AXNdCrYPdpMVicyRHnHgkBCN0cWfLAGXiwzuKTyDjpkBxghL8VyCHP 8vg+UX59zHWegcHbiwRgfezRRJIHW2Eqj+HTMXok6clihs9IXvY56n3ZGkWbDAppbLw2 d73Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GlU4TXYlkTTCcgX0TmwwrU9v30UNuB5Nx7hIbvCH79w=; b=l04D4G32k2mu0a31X+KhcDsAjDN7HqQq075kzvGkSUPS1fn6GsgaxfsciOLWbR1G65 OQG36uIc8027PenOSyoxHAgQvJvckUcmptvzgTHmLZyZlbk/HhAW5TT3chm+Eos9mQI1 dXGaRIUTM5NltWd6zV2tNd/Ofuxys955L4jP1JyX/9YW3KsDsYpbqQzPorYKfsr8rI6C tVLAvFs+D8hMyXLqAO9YICEo0lumqNc+QVcMV2WAnM09DG5TC2EYIcNZJkKGzUaXftED ZT732aSTthaikBOmnJrmTqjkzf8vQheosukZBYbEl+tIqS8e2tLJLFp20kZJgbSIeYni nXAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@konsulko.com header.s=google header.b=Jc66LOst; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=konsulko.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o11-20020a17090ac08b00b001bc80748bdfsi6355570pjs.50.2022.03.02.15.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 15:28:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@konsulko.com header.s=google header.b=Jc66LOst; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=konsulko.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 49F851451F0; Wed, 2 Mar 2022 15:00:29 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240109AbiCBIjQ (ORCPT + 99 others); Wed, 2 Mar 2022 03:39:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240155AbiCBIjN (ORCPT ); Wed, 2 Mar 2022 03:39:13 -0500 Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAF215883D for ; Wed, 2 Mar 2022 00:38:30 -0800 (PST) Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-2d62593ad9bso8640287b3.8 for ; Wed, 02 Mar 2022 00:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GlU4TXYlkTTCcgX0TmwwrU9v30UNuB5Nx7hIbvCH79w=; b=Jc66LOst6QR8VL/b95HK7zFdKQGbi3a9Rsgb8DN8HPLYEFm9yQjI6AxDCxDFaSoj6o LHn6vQcwPaw4J6Eja+hMkL4mQaXtZd6l0rKqk3RoLthCBCfFisxtE08wxG4ELRnbIcto Jl6ys1bWQcjvQT75z5urAoFx6XeqJnts1rJBw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GlU4TXYlkTTCcgX0TmwwrU9v30UNuB5Nx7hIbvCH79w=; b=FtX9KgzKrFnxnaBzg8XJgPtRcB8oA+1Zaej7miE8ZujT7YDge9RpKl1p6l5JJD4OJy lH6pKRr3lisdvUr4bKZ397tUzkmI0Cb+L6McjCTZ03q5MFOBEY6YLzeh9TF1he7xh9V1 jN3MZN7WvUC2CPRpyEMc3H2pPKLdF6UisFp+3My7R3L+CL1LLKSQx/e0isFeoyBUU0ij +KYet2jNtBkzL4TRKru6wvpdIDSgz2ID4apxOgqLsNPw3/koqRA4VyXb4WfWz7vmNFFS yGcsnbOjbIYHOP8TFX8Rf+GO+odJ/MB+dtJt5pwaCvvHxWinvwXTYWHC/SaeX2d9yxYd +Rvg== X-Gm-Message-State: AOAM530jKLAy9Z00UwttdUwyOFqvKzM3FHljBp/bb4PLA697H+xVSqpH NIhfXd1HHyANJLGpaGuFkr31suWphqKmd4hEAXXv4g== X-Received: by 2002:a81:1143:0:b0:2db:ccb4:b0a1 with SMTP id 64-20020a811143000000b002dbccb4b0a1mr9445925ywr.499.1646210309769; Wed, 02 Mar 2022 00:38:29 -0800 (PST) MIME-Version: 1.0 References: <20220219092533.12596-1-linmiaohe@huawei.com> <20220219092533.12596-8-linmiaohe@huawei.com> In-Reply-To: <20220219092533.12596-8-linmiaohe@huawei.com> From: Vitaly Wool Date: Wed, 2 Mar 2022 09:38:18 +0100 Message-ID: Subject: Re: [PATCH 7/9] mm/z3fold: remove redundant list_del_init of zhdr->buddy in z3fold_free To: Miaohe Lin Cc: Andrew Morton , Linux-MM , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 19, 2022 at 10:26 AM Miaohe Lin wrote: > > The do_compact_page will do list_del_init(&zhdr->buddy) for us. Remove this > extra one to save some possible cpu cycles. > > Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Wool > --- > mm/z3fold.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/mm/z3fold.c b/mm/z3fold.c > index 18a697f6fe32..867c590df027 100644 > --- a/mm/z3fold.c > +++ b/mm/z3fold.c > @@ -1244,9 +1244,6 @@ static void z3fold_free(struct z3fold_pool *pool, unsigned long handle) > return; > } > if (zhdr->cpu < 0 || !cpu_online(zhdr->cpu)) { > - spin_lock(&pool->lock); > - list_del_init(&zhdr->buddy); > - spin_unlock(&pool->lock); > zhdr->cpu = -1; > kref_get(&zhdr->refcount); > clear_bit(PAGE_CLAIMED, &page->private); > -- > 2.23.0 >