Re: [f2fs-dev] [PATCH] f2fs: Use crypto crc32 functions

2016-03-08 Thread Keith Mok
fallback mechanism, it should be done inside the crypto_shash_update function, rather than scatter all over to their users. Thanks. 2016-03-07 15:35 GMT-08:00 Jaegeuk Kim : > On Wed, Mar 02, 2016 at 12:01:02PM -0800, Keith Mok wrote: >> Will update the first BUG_ON by using SHASH_DESC_ON_STA

[f2fs-dev] [PATCH v2] f2fs: Use cryptoapi crc32 functions

2016-03-02 Thread Keith Mok
From: Keith Mok The crc function is done bit by bit. Optimize this by use cryptoapi crc32 function which is backed by h/w acceleration. Signed-off-by: Keith Mok --- fs/f2fs/Kconfig | 2 ++ fs/f2fs/checkpoint.c | 6 +++--- fs/f2fs/f2fs.h | 48

Re: [f2fs-dev] [PATCH] f2fs: Use crypto crc32 functions

2016-03-02 Thread Keith Mok
Will update the first BUG_ON by using SHASH_DESC_ON_STACK. 2016-03-02 10:21 GMT-08:00 Jaegeuk Kim : > Hi Keith, > >> +static inline __u32 f2fs_crc32(struct f2fs_sb_info *sbi, const void >> *address, >> +unsigned int length) >> +{ >> + struct { >> + struct

Re: [f2fs-dev] [PATCH] f2fs: Use crypto crc32 functions

2016-03-01 Thread Keith Mok
Hi, > f2fs_crc32/f2fs_crc_valid won't been invoked very often, so I don't think that would cause much overhead in calculation and make things slow. Right, the gain is not that big. But I think it still worth it. That's not much code changes for it. > Moreover, we could suffer crash if any error o

[f2fs-dev] [PATCH] f2fs: Use crypto crc32 functions

2016-02-29 Thread Keith Mok
The crc function is done bit by bit and painfully slow, switch to use crypto crc32 function which is backed by h/w/ acceleration. Signed-off-by: Keith Mok --- fs/f2fs/Kconfig | 2 ++ fs/f2fs/checkpoint.c | 6 +++--- fs/f2fs/f2fs.h | 52