On Wed, 26 Nov 2025 12:55:33 +0100 Corinna Vinschen wrote: > On Nov 26 19:20, Takashi Yano wrote: > > Hi Corinna, > > > > On Tue, 25 Nov 2025 15:50:56 +0100 > > Corinna Vinschen wrote: > > > On Nov 25 12:31, Corinna Vinschen wrote: > > > > A short addendum: > > > > > > > > On Nov 25 11:38, Corinna Vinschen wrote: > > > > > That means: > > > > > > > > > > - i_all_lf as array incures extra cost only at fork/execve time by > > > > > having to copy additional 64K over to the child process. > > > > > > > > If we count the cygheap copy here, we also have to count the > > > > mallocs in the other two cases... > > > > > > > > > > - i_all_lf as malloced pointer in inode_t incures extra cost once > > > > > per created inode (malloc), once per execve (malloc), once per > > > > > deleted inode (free). > > > > > > > > Plus an extra 64K user heap copy at fork(2) time. > > > > > > > > > - i_all_lf as local variable incures extra cost once per thread > > > > > (malloc), per process, under ideal conditions. > > > > > > > > Plus an extra 64K user heap copy at fork(2) time. > > > > > > I just had a bit of time so I prepared a v4. Can you please check if > > > this is ok? > > > > Thanks! Looks good to me. I also confirmed the original test case > > from Nahor works fine with this patch. In addition, > > stress-ng --flock 20 -t 10 > > and > > stress-ng --lockf 20 -t 10 > > pass. > > Great to read, thanks for your review. I just sent a followup patch, > purely stylistic. Please have a quick view if the patch is ok. If so, > I'll push the patches out to main and the 3.6 branch.
The followup patch LGTM. Thanks! -- Takashi Yano <[email protected]>
