Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp41393rdb; Tue, 16 Jan 2024 14:21:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPTxehHIKsgiCCCn6vZzFhPsgf1hUMCV5F6ub+opKOcpBS13ePZJ9YVXIBw6zB05zsTaCE X-Received: by 2002:a05:6512:ad4:b0:50e:d3dc:2653 with SMTP id n20-20020a0565120ad400b0050ed3dc2653mr4973483lfu.5.1705443678493; Tue, 16 Jan 2024 14:21:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705443678; cv=pass; d=google.com; s=arc-20160816; b=vv5wWxEoq6kvKvu+jC1X/svAEpp0lmCrlMPepVU/ZdQ4+8Qevxr3TYe4cKUNyLQqjf 2KwULJfPPpanRiyDlk+5JUZL1cMYXd3hTonPl1rd+jTrvgO8gmmXVURDZfQtuLCHtJfj 6tCy/KFDyBIy3Em6TbVvEPShLRBA8nIjE32GOG9jojdw2+3sGSxX064zuoKCbFju53bw 3lAQVnUhM7xz2a1KXFD2pcABG57NHlaQH5JLBa3fBSwqfEd77NNAeIdNIrKQUnc8yemN QJ4jBBGQsUm4BkDJ2wgMLvPf4iMtxOpd0Hizd7pzcptMKV/wyUt81fLHX4cygc7Mx1t7 4LGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aa38REvmK5S3+j3Zy/vUzY/XryNOBNttaU4QwgDik0U=; fh=c9rPZmWkuhxCY6en8Bzjtoogao6aSo1AHiBIwIn7Ed4=; b=GHB1iDMP2i4xHkAT94fc9b7qNlKwEVR8INfFq7uxzfixjiqITm5B0V34XzK/yfW7fm a4PQ4A8UrDhjLE0022tvyxYWYbpFuM6FbaPgdqEk0hcLv5QfxQgJCNhA1wVr5FObHlXZ rjYEeox60OMhjP5fhtAp2QU7Rzay9P6a+7WxftvCa8+y6Lbj44hICo7QdwMPNLVn6fDo Y/k9duophGPdQgp8/WY5bcMUrC2HDd2xzYXHQS2oEzMxmNarljNkmQssTtXwLg5u/eKW nQ0eJ1ilbtqa666i/BiHJaKb9hsO/5GuTgU0oNwZ3t3t/Rm0SYEa7Y9fsFyvhUqxO8bO i01w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZD1zCV09; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-28279-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28279-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cd19-20020a170906b35300b00a2c29ddca3dsi5134308ejb.72.2024.01.16.14.21.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 14:21:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28279-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZD1zCV09; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-28279-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28279-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B7CAD1F27474 for ; Tue, 16 Jan 2024 22:21:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 634AD28E35; Tue, 16 Jan 2024 21:04:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ZD1zCV09" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C79A128E2E for ; Tue, 16 Jan 2024 21:04:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705439047; cv=none; b=n2l4f6FDEnutWS2bMvlEeWffRHoR15+A3B7FfP3/L30+cegvXWeMcGIxEUZxVJB6/g2PLosxBElLkGXvrsbTC8aHkB5EVcf/pJkDNddr1HKdHln6jG8+kYAx86kIs0/tO8FG1+KvKjldV3yhz5W4jreZJ++TTKz+D++Jt/fcDyg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705439047; c=relaxed/simple; bh=c4eqrVWav+vUO8xRH/UrscPT4NRVYA62fawyfomcagQ=; h=DKIM-Signature:Received:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=JvPB04slIQLtUYUT/Fx3zi8gMd5414urJljDt1AlV+C6SnKyXCS5CHKKlmfd2t1qS4qpWfhjY8HCg9QgOIU5qPxttPT8yd3t1CXzFHsKVt69QhQJa4K6xk22KCU0+WjgmZj53KMT2XXHxi5lVliPKGyEF5h+rJA0Ibtn7V6zStM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=ZD1zCV09; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=aa38REvmK5S3+j3Zy/vUzY/XryNOBNttaU4QwgDik0U=; b=ZD1zCV09Oq+I4rJmtS5wN0PRm0 fJdNb3aM9r36OOMvAs/5QRE/5R5VZWc8WcrWXNXB+1rD/feUafNjoeT60278cBB2T/W/Kr2EiUt11 D2iXWz/8ZfP0lmqUMo8xOGNjvC+GalOYOn3N3hA1c9r1pSAfVpnAHYjFFw9z2v7dNaPK4Z06kJRye 2oPeRc2z/bU6dwFsUnziV3hqKQCrc5mpRYF1pPl6XkNuTB8LHKimYLg6oUADJ3zSuPtreFTGjCz0q QHpK+JajFA/UTuV8pjoX/vmdNJ1UgZvhs4E7UBuRlMC7hmmUNZW1CXkFHwtY84I/sp3S8xQ46V2n4 L/KIfjZg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rPqb4-00EFWM-Lp; Tue, 16 Jan 2024 21:03:46 +0000 Date: Tue, 16 Jan 2024 21:03:46 +0000 From: Matthew Wilcox To: Zhongkun He Cc: Nhat Pham , Yosry Ahmed , akpm@linux-foundation.org, hannes@cmpxchg.org, sjenning@redhat.com, ddstreet@ieee.org, vitaly.wool@konsulko.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Chris Li Subject: Re: [External] Re: [PATCH] mm: zswap: fix the lack of page lru flag in zswap_writeback_entry Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jan 16, 2024 at 09:40:05PM +0800, Zhongkun He wrote: > 2) __read_swap_cache_async has six parameters, so there is no space to > add a new one, add_to_lru_head. That's easy enough. Define a new set of flags, make one of them the equivalent of skip_if_exists. Something like: typedef unsigned int __bitwise read_swap_t; #define READ_SWAP_SKIP_EXISTING ((__force read_swap_t)0x00000001) #define READ_SWAP_ADD_TAIL ((__force read_swap_t)0x00000002) There's only six callers of __read_swap_cache_async() to convert, so not really a big deal.