Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1645357rdb; Thu, 25 Jan 2024 01:44:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHV4p/4MlwKfI/aGVp2wzINqEBbA/wscwWt/QnmthjU8GoCsIDD1kPvaXo4Xhkr5FJCSpOF X-Received: by 2002:a17:907:8b91:b0:a31:7b16:af2b with SMTP id tb17-20020a1709078b9100b00a317b16af2bmr235019ejc.3.1706175850855; Thu, 25 Jan 2024 01:44:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706175850; cv=pass; d=google.com; s=arc-20160816; b=QGdJpyrf4RqQTs/fiHMNT49AHjhrNwVHgGkYy2atRk9y1Kol53rLlvRByB5WLmwefD WEWUMK44JytDRKYQr+a4b9JX3i6z8REdnjiEUaPQYKiDYatS3nBMpzXrJRWj7nN2CbfV +FVPNxRHDmE5Q0xsErQ5+VofoXNfT1Lv7RVTtxm+Y6XyP2W5mM3oqSoEN+tsVFDCypQt 2WK0VgBnO77Y4KU7bTi/PpilnKHMlTiekRjNBi19iVCKtcEtFv181PylAdYhNpwME0kb 8tV8K6qlKnloiimSeOOFuN6jDCZJaHbW99yc4yvzkcV5U/eGug4W4LUgfH6FqKPBFG0W KKbw== 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; bh=2dLuKQxnxrLNBmwaETUmJxdBMC7z7aFdK5rqibTtqvQ=; fh=EJi0vFMRUzf7Pl7ofgA5NE8AvCOoZj5C/kfV5Mkbsic=; b=wkPI4wiY5l1OISdBymrW08Rj9B+0PXhpxyrSmjc4x//CjvTOFOf8M1wVDJjGeZlyG2 FnEcns60xW05TxSjEV9MHcIKdzZZ8OabO/nA4zYMvq1umd+4nkB6TlW66YtPJooIIeZP 4a5n053IuRymq9FBoMlgohwy6LFJyyqNvwxpqSM9XU923H0T7EKf9W98tylU9uwsmASM X6Cc130DsUb6gqAIpaNk18AMCurJNimwINdhBNw3KIJ/MqbBtD6w83x6EfngD5hc8yx+ 3Pm+GvbVqgEzlzQzDnY5VrS3QBYJOP1PwanPZ4XNMkr3qOZNspZ5ETyNaTykk9FPRVi5 McEg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-kernel+bounces-38298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38298-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 x7-20020a170906134700b00a318a78f932si250919ejb.257.2024.01.25.01.44.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 01:44:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38298-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; arc=pass (i=1 spf=pass spfdomain=gondor.apana.org.au); spf=pass (google.com: domain of linux-kernel+bounces-38298-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38298-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 71A0D1F25691 for ; Thu, 25 Jan 2024 09:41:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C619F1C680; Thu, 25 Jan 2024 09:41:34 +0000 (UTC) Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (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 7402D1C687; Thu, 25 Jan 2024 09:41:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.6.53.87 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706175694; cv=none; b=kPvEctm6H5jajlaG0msDcFHmaN5ffNrlZkkin/sShcJubElAYPEM5AIvkCoK3ykSG1VAjU8QxWakC7xZoC+0MYE+nWSGc0qM0T+/V/WTUouT/Ya1SZjR7ryL8EI1cIWnaMRTXBCTGbeLH5cwmzZQZWNuUra/2GCa37lQLNHRS8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706175694; c=relaxed/simple; bh=a1uRqjaQU/0jst93xo19fk3EChLuryXiTmd5Hs2DoLM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OLAR7rYeRBvexSsXvqbckJnAGld1ERkIXm1v8VF/rfvlSNnbSEQ9rxLvny2dJFdku9n1YSy0v+tk6gLol2MQruoj4m8VzMT8C/E5AezDcQgplV6OSF4lSllmGEWsrULtg6y5OTi8wXxUTF+SLEHrcoLuxbVsenZVmOWUBRL6N+0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; arc=none smtp.client-ip=144.6.53.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rSwEG-005sPE-AZ; Thu, 25 Jan 2024 17:41:01 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Thu, 25 Jan 2024 17:41:12 +0800 Date: Thu, 25 Jan 2024 17:41:12 +0800 From: Herbert Xu To: Barry Song <21cnbao@gmail.com> Cc: davem@davemloft.net, akpm@linux-foundation.org, chriscli@google.com, chrisl@kernel.org, ddstreet@ieee.org, hannes@cmpxchg.org, linux-mm@kvack.org, nphamcs@gmail.com, sjenning@redhat.com, vitaly.wool@konsulko.com, yosryahmed@google.com, zhouchengming@bytedance.com, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [PATCH v4 2/6] mm/zswap: reuse dstmem when decompress Message-ID: References: <20240103025759.523120-1-21cnbao@gmail.com> <20240103025759.523120-3-21cnbao@gmail.com> 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: <20240103025759.523120-3-21cnbao@gmail.com> On Wed, Jan 03, 2024 at 03:57:59PM +1300, Barry Song wrote: > > > We could certainly do that. But I wonder if it might actually be > > better for you to allocate a second sync-only algorithm for such > > cases. I'd like to see some real numbers. > > some hardware might want to use an accelerator to help offload CPU's > work. their drivers are working in async mode, for example, hisilicon > and intel. > > I don't have the exact number we can save by removing the redundant > memcpy, nor do i have a proper hardware to test and get the number. > As Chengming is actually working in zswap, i wonder if you can test > my patches and post some data? I don't have the hardware to test this. Since you're proposing the change, please test it to ensure that we're not adding cruft to the API that's actually detrimental to performance. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt