All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kanchana P Sridhar <kanchana.p.sridhar@intel.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	hannes@cmpxchg.org, yosryahmed@google.com, nphamcs@gmail.com,
	chengming.zhou@linux.dev, usamaarif642@gmail.com,
	ryan.roberts@arm.com, ying.huang@intel.com, 21cnbao@gmail.com,
	akpm@linux-foundation.org, linux-crypto@vger.kernel.org,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	clabbe@baylibre.com, ardb@kernel.org, ebiggers@google.com,
	surenb@google.com, kristen.c.accardi@intel.com
Cc: oe-kbuild-all@lists.linux.dev, wajdi.k.feghali@intel.com,
	vinodh.gopal@intel.com, kanchana.p.sridhar@intel.com
Subject: Re: [PATCH v4 03/10] crypto: iaa - Implement batch_compress(), batch_decompress() API in iaa_crypto.
Date: Tue, 26 Nov 2024 15:05:37 +0800	[thread overview]
Message-ID: <202411261737.ozFff8Ym-lkp@intel.com> (raw)
In-Reply-To: <20241123070127.332773-4-kanchana.p.sridhar@intel.com>

Hi Kanchana,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 5a7056135bb69da2ce0a42eb8c07968c1331777b]

url:    https://github.com/intel-lab-lkp/linux/commits/Kanchana-P-Sridhar/crypto-acomp-Define-two-new-interfaces-for-compress-decompress-batching/20241125-110412
base:   5a7056135bb69da2ce0a42eb8c07968c1331777b
patch link:    https://lore.kernel.org/r/20241123070127.332773-4-kanchana.p.sridhar%40intel.com
patch subject: [PATCH v4 03/10] crypto: iaa - Implement batch_compress(), batch_decompress() API in iaa_crypto.
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20241126/202411261737.ozFff8Ym-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241126/202411261737.ozFff8Ym-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411261737.ozFff8Ym-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/crypto/intel/iaa/iaa_crypto_main.c:1882: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * This API provides IAA compress batching functionality for use by swap
   drivers/crypto/intel/iaa/iaa_crypto_main.c:2010: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * This API provides IAA decompress batching functionality for use by swap


vim +1882 drivers/crypto/intel/iaa/iaa_crypto_main.c

  1880	
  1881	/**
> 1882	 * This API provides IAA compress batching functionality for use by swap
  1883	 * modules.
  1884	 *
  1885	 * @reqs: @nr_pages asynchronous compress requests.
  1886	 * @wait: crypto_wait for synchronous acomp batch compress. If NULL, the
  1887	 *        completions will be processed asynchronously.
  1888	 * @pages: Pages to be compressed by IAA in parallel.
  1889	 * @dsts: Pre-allocated destination buffers to store results of IAA
  1890	 *        compression. Each element of @dsts must be of size "PAGE_SIZE * 2".
  1891	 * @dlens: Will contain the compressed lengths.
  1892	 * @errors: zero on successful compression of the corresponding
  1893	 *          req, or error code in case of error.
  1894	 * @nr_pages: The number of pages, up to CRYPTO_BATCH_SIZE,
  1895	 *            to be compressed.
  1896	 */
  1897	static void iaa_comp_acompress_batch(
  1898		struct acomp_req *reqs[],
  1899		struct crypto_wait *wait,
  1900		struct page *pages[],
  1901		u8 *dsts[],
  1902		unsigned int dlens[],
  1903		int errors[],
  1904		int nr_pages)
  1905	{
  1906		struct scatterlist inputs[CRYPTO_BATCH_SIZE];
  1907		struct scatterlist outputs[CRYPTO_BATCH_SIZE];
  1908		bool compressions_done = false;
  1909		bool poll = (async_mode && !use_irq);
  1910		int i;
  1911	
  1912		BUG_ON(nr_pages > CRYPTO_BATCH_SIZE);
  1913		BUG_ON(!poll && !wait);
  1914	
  1915		if (poll)
  1916			iaa_set_req_poll(reqs, nr_pages, true);
  1917		else
  1918			iaa_set_req_poll(reqs, nr_pages, false);
  1919	
  1920		/*
  1921		 * Prepare and submit acomp_reqs to IAA. IAA will process these
  1922		 * compress jobs in parallel if async-poll mode is enabled.
  1923		 * If IAA is used in sync mode, the jobs will be processed sequentially
  1924		 * using "wait".
  1925		 */
  1926		for (i = 0; i < nr_pages; ++i) {
  1927			sg_init_table(&inputs[i], 1);
  1928			sg_set_page(&inputs[i], pages[i], PAGE_SIZE, 0);
  1929	
  1930			/*
  1931			 * Each dst buffer should be of size (PAGE_SIZE * 2).
  1932			 * Reflect same in sg_list.
  1933			 */
  1934			sg_init_one(&outputs[i], dsts[i], PAGE_SIZE * 2);
  1935			acomp_request_set_params(reqs[i], &inputs[i],
  1936						 &outputs[i], PAGE_SIZE, dlens[i]);
  1937	
  1938			/*
  1939			 * If poll is in effect, submit the request now, and poll for
  1940			 * a completion status later, after all descriptors have been
  1941			 * submitted. If polling is not enabled, submit the request
  1942			 * and wait for it to complete, i.e., synchronously, before
  1943			 * moving on to the next request.
  1944			 */
  1945			if (poll) {
  1946				errors[i] = iaa_comp_acompress(reqs[i]);
  1947	
  1948				if (errors[i] != -EINPROGRESS)
  1949					errors[i] = -EINVAL;
  1950				else
  1951					errors[i] = -EAGAIN;
  1952			} else {
  1953				acomp_request_set_callback(reqs[i],
  1954							   CRYPTO_TFM_REQ_MAY_BACKLOG,
  1955							   crypto_req_done, wait);
  1956				errors[i] = crypto_wait_req(iaa_comp_acompress(reqs[i]),
  1957							    wait);
  1958				if (!errors[i])
  1959					dlens[i] = reqs[i]->dlen;
  1960			}
  1961		}
  1962	
  1963		/*
  1964		 * If not doing async compressions, the batch has been processed at
  1965		 * this point and we can return.
  1966		 */
  1967		if (!poll)
  1968			goto reset_reqs_wait;
  1969	
  1970		/*
  1971		 * Poll for and process IAA compress job completions
  1972		 * in out-of-order manner.
  1973		 */
  1974		while (!compressions_done) {
  1975			compressions_done = true;
  1976	
  1977			for (i = 0; i < nr_pages; ++i) {
  1978				/*
  1979				 * Skip, if the compression has already completed
  1980				 * successfully or with an error.
  1981				 */
  1982				if (errors[i] != -EAGAIN)
  1983					continue;
  1984	
  1985				errors[i] = iaa_comp_poll(reqs[i]);
  1986	
  1987				if (errors[i]) {
  1988					if (errors[i] == -EAGAIN)
  1989						compressions_done = false;
  1990				} else {
  1991					dlens[i] = reqs[i]->dlen;
  1992				}
  1993			}
  1994		}
  1995	
  1996	reset_reqs_wait:
  1997		/*
  1998		 * For the same 'reqs[]' and 'wait' to be usable by
  1999		 * iaa_comp_acompress()/iaa_comp_deacompress():
  2000		 * Clear the CRYPTO_ACOMP_REQ_POLL bit on the acomp_reqs.
  2001		 * Reset the crypto_wait "wait" callback to reqs[0].
  2002		 */
  2003		iaa_set_req_poll(reqs, nr_pages, false);
  2004		acomp_request_set_callback(reqs[0],
  2005					   CRYPTO_TFM_REQ_MAY_BACKLOG,
  2006					   crypto_req_done, wait);
  2007	}
  2008	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2024-11-26  7:05 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-23  7:01 [PATCH v4 00/10] zswap IAA compress batching Kanchana P Sridhar
2024-11-23  7:01 ` [PATCH v4 01/10] crypto: acomp - Define two new interfaces for compress/decompress batching Kanchana P Sridhar
2024-11-25  9:35   ` Herbert Xu
2024-11-25 20:03     ` Sridhar, Kanchana P
2024-11-26  2:13       ` Sridhar, Kanchana P
2024-11-26  2:14         ` Herbert Xu
2024-11-26  2:37           ` Sridhar, Kanchana P
2024-11-27  1:22             ` Sridhar, Kanchana P
2024-11-27  5:04               ` Herbert Xu
2024-11-23  7:01 ` [PATCH v4 02/10] crypto: iaa - Add an acomp_req flag CRYPTO_ACOMP_REQ_POLL to enable async mode Kanchana P Sridhar
2024-11-23  7:01 ` [PATCH v4 03/10] crypto: iaa - Implement batch_compress(), batch_decompress() API in iaa_crypto Kanchana P Sridhar
2024-11-26  7:05   ` kernel test robot [this message]
2024-11-23  7:01 ` [PATCH v4 04/10] crypto: iaa - Make async mode the default Kanchana P Sridhar
2024-11-23  7:01 ` [PATCH v4 05/10] crypto: iaa - Disable iaa_verify_compress by default Kanchana P Sridhar
2024-11-23  7:01 ` [PATCH v4 06/10] crypto: iaa - Re-organize the iaa_crypto driver code Kanchana P Sridhar
2024-11-23  7:01 ` [PATCH v4 07/10] crypto: iaa - Map IAA devices/wqs to cores based on packages instead of NUMA Kanchana P Sridhar
2024-11-23  7:01 ` [PATCH v4 08/10] crypto: iaa - Distribute compress jobs from all cores to all IAAs on a package Kanchana P Sridhar
2024-11-23  7:01 ` [PATCH v4 09/10] mm: zswap: Allocate pool batching resources if the crypto_alg supports batching Kanchana P Sridhar
2024-12-02 19:15   ` Nhat Pham
2024-12-03  0:30     ` Sridhar, Kanchana P
2024-12-03  8:00       ` Herbert Xu
2024-12-03 21:37         ` Sridhar, Kanchana P
2024-12-03 21:44           ` Yosry Ahmed
2024-12-03 22:17             ` Sridhar, Kanchana P
2024-12-03 22:24               ` Sridhar, Kanchana P
2024-12-04  1:42             ` Herbert Xu
2024-12-04 22:35               ` Yosry Ahmed
2024-12-04 22:49                 ` Sridhar, Kanchana P
2024-12-04 22:55                   ` Yosry Ahmed
2024-12-04 23:12                     ` Sridhar, Kanchana P
2024-12-21  6:30       ` Sridhar, Kanchana P
2024-11-23  7:01 ` [PATCH v4 10/10] mm: zswap: Compress batching with Intel IAA in zswap_batch_store() of large folios Kanchana P Sridhar
2024-11-25  8:00   ` kernel test robot
2024-11-25 20:20   ` Yosry Ahmed
2024-11-25 21:47     ` Johannes Weiner
2024-11-25 21:54     ` Sridhar, Kanchana P
2024-11-25 22:08       ` Yosry Ahmed
2024-12-02 19:26       ` Nhat Pham
2024-12-03  0:34         ` Sridhar, Kanchana P

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202411261737.ozFff8Ym-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=chengming.zhou@linux.dev \
    --cc=clabbe@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kanchana.p.sridhar@intel.com \
    --cc=kristen.c.accardi@intel.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ryan.roberts@arm.com \
    --cc=surenb@google.com \
    --cc=usamaarif642@gmail.com \
    --cc=vinodh.gopal@intel.com \
    --cc=wajdi.k.feghali@intel.com \
    --cc=ying.huang@intel.com \
    --cc=yosryahmed@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.