Re: [f2fs-dev] [PATCH] f2fs: handle decompress only post processing in softirq

2022-06-14 Thread Gao Xiang
On Tue, Jun 14, 2022 at 10:49:37AM -0700, Daeho Jeong wrote: > > Yeah, I heard that you folks are really suffered from the scheduling > > issues. But for my own previous experience, extra memory footprints are > > really critical in Android low memory scenarios (no matter low-ended > > devices or a

Re: [f2fs-dev] [PATCH] f2fs: handle decompress only post processing in softirq

2022-06-14 Thread Daeho Jeong
> Yeah, I heard that you folks are really suffered from the scheduling > issues. But for my own previous experience, extra memory footprints are > really critical in Android low memory scenarios (no matter low-ended > devices or artificial workloads), it tossed me a lot. So I finally > ntroduced ma

Re: [f2fs-dev] [PATCH] f2fs: handle decompress only post processing in softirq

2022-06-14 Thread Gao Xiang
Hi Daeho, On Tue, Jun 14, 2022 at 09:46:50AM -0700, Daeho Jeong wrote: > > > > Some my own previous thoughts about this strategy: > > > > - If we allocate all memory and map these before I/Os, all inflight I/Os > >will keep such temporary pages all the time until decompression is > >finis

Re: [f2fs-dev] [PATCH] f2fs: handle decompress only post processing in softirq

2022-06-14 Thread Daeho Jeong
> > Some my own previous thoughts about this strategy: > > - If we allocate all memory and map these before I/Os, all inflight I/Os >will keep such temporary pages all the time until decompression is >finished. In contrast, if we allocate or reuse such pages just before >decompression,

Re: [f2fs-dev] [PATCH] f2fs: handle decompress only post processing in softirq

2022-06-14 Thread Daeho Jeong
> One question: is this (the bio endio callback) actually guaranteed to be > executed from a softirq? If you look at dm-crypt's support for workqueue-less > decryption, for example, it explicitly checks 'in_hardirq() || > irqs_disabled()' > and schedules a tasklet if either of those is the case.

Re: [f2fs-dev] [PATCH] f2fs: handle decompress only post processing in softirq

2022-06-14 Thread Gao Xiang
Hi all, On Mon, Jun 13, 2022 at 10:38:25PM -0700, Eric Biggers wrote: > [+Cc Nathan Huckleberry who is looking into a similar problem in dm-verity] > > On Mon, Jun 13, 2022 at 08:56:12AM -0700, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Now decompression is being handled in workqueue and

Re: [f2fs-dev] [PATCH] f2fs: handle decompress only post processing in softirq

2022-06-13 Thread Eric Biggers
[+Cc Nathan Huckleberry who is looking into a similar problem in dm-verity] On Mon, Jun 13, 2022 at 08:56:12AM -0700, Daeho Jeong wrote: > From: Daeho Jeong > > Now decompression is being handled in workqueue and it makes read I/O > latency non-deterministic, because of the non-deterministic sch

[f2fs-dev] [PATCH] f2fs: handle decompress only post processing in softirq

2022-06-13 Thread Daeho Jeong
From: Daeho Jeong Now decompression is being handled in workqueue and it makes read I/O latency non-deterministic, because of the non-deterministic scheduling nature of workqueues. So, I made it handled in softirq context only if possible. Signed-off-by: Daeho Jeong --- fs/f2fs/compress.c | 14