Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: engine - Realign struct crypto_engine to save 8 bytes

Realign struct crypto_engine to reduce its size by 8 bytes. Total size
is now 192 bytes, allowing it to fit within 3 cachelines instead of 4.

pahole output before:

/* size: 200, cachelines: 4, members: 17 */
/* sum members: 183, holes: 3, sum holes: 17 */
/* paddings: 1, sum paddings: 4 */
/* last cacheline: 8 bytes */

and after:

/* size: 192, cachelines: 3, members: 17 */
/* sum members: 183, holes: 2, sum holes: 9 */
/* paddings: 1, sum paddings: 4 */

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Thorsten Blum and committed by
Herbert Xu
2ee97c19 e3f08b26

+2 -3
+2 -3
include/crypto/internal/engine.h
··· 27 27 * @retry_support: indication that the hardware allows re-execution 28 28 * of a failed backlog request 29 29 * crypto-engine, in head position to keep order 30 + * @rt: whether this queue is set to run as a realtime task 30 31 * @list: link with the global crypto engine list 31 32 * @queue_lock: spinlock to synchronise access to request queue 32 33 * @queue: the crypto queue of the engine 33 - * @rt: whether this queue is set to run as a realtime task 34 34 * @prepare_crypt_hardware: a request will soon arrive from the queue 35 35 * so the subsystem requests the driver to prepare the hardware 36 36 * by issuing this call ··· 51 51 bool running; 52 52 53 53 bool retry_support; 54 + bool rt; 54 55 55 56 struct list_head list; 56 57 spinlock_t queue_lock; 57 58 struct crypto_queue queue; 58 59 struct device *dev; 59 - 60 - bool rt; 61 60 62 61 int (*prepare_crypt_hardware)(struct crypto_engine *engine); 63 62 int (*unprepare_crypt_hardware)(struct crypto_engine *engine);