lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230417154415.00006a18.zbestahu@gmail.com>
Date:   Mon, 17 Apr 2023 15:44:15 +0800
From:   Yue Hu <zbestahu@...il.com>
To:     Gao Xiang <hsiangkao@...ux.alibaba.com>
Cc:     xiang@...nel.org, chao@...nel.org, linux-erofs@...ts.ozlabs.org,
        jefflexu@...ux.alibaba.com, linux-kernel@...r.kernel.org,
        huyue2@...lpad.com, zhangwen@...lpad.com
Subject: Re: [PATCH] erofs: remove unneeded icur field from struct
 z_erofs_decompress_frontend

On Mon, 17 Apr 2023 15:12:31 +0800
Gao Xiang <hsiangkao@...ux.alibaba.com> wrote:

> On 2023/4/17 15:15, Yue Hu wrote:
> > On Mon, 17 Apr 2023 15:00:25 +0800
> > Gao Xiang <hsiangkao@...ux.alibaba.com> wrote:
> >   
> 
> ..
> 
> >>
> >> Although please help refine the comment below:
> >>
> >> 	/* scan & fill inplace I/O pages in the reverse order */  
> > 
> > Ok, will refine it in v2.  
> 
> I rethink this, I don't want to go far in this way, and this makes a
> O(n) scan into O(n^2) when a single inplace I/O page is added.

Yeah, i misread that, it should be global before submission, just ignore the change.

> 
> So sorry, I don't think it's a good way, although I also don't think
> `icur` is a good name and we might need to find a better name.
> 
> Thanks,
> Gao Xiang
> 
> >   
> >>
> >> Thanks,
> >> Gao Xiang
> >>  
> >>>> +    unsigned int icur = pcl->pclusterpages;
> >>>> -    while (fe->icur > 0) {
> >>>> -        if (!cmpxchg(&pcl->compressed_bvecs[--fe->icur].page,
> >>>> +    while (icur > 0) {
> >>>> +        if (!cmpxchg(&pcl->compressed_bvecs[--icur].page,
> >>>>                     NULL, bvec->page)) {
> >>>> -            pcl->compressed_bvecs[fe->icur] = *bvec;
> >>>> +            pcl->compressed_bvecs[icur] = *bvec;
> >>>>                return true;
> >>>>            }
> >>>>        }
> >>>> @@ -877,8 +876,6 @@ static int z_erofs_collector_begin(struct z_erofs_decompress_frontend *fe)
> >>>>        }
> >>>>        z_erofs_bvec_iter_begin(&fe->biter, &fe->pcl->bvset,
> >>>>                    Z_EROFS_INLINE_BVECS, fe->pcl->vcnt);
> >>>> -    /* since file-backed online pages are traversed in reverse order */
> >>>> -    fe->icur = z_erofs_pclusterpages(fe->pcl);
> >>>>        return 0;
> >>>>    }  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ