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: <20200731065941.GD25674@infradead.org>
Date:   Fri, 31 Jul 2020 07:59:41 +0100
From:   Christoph Hellwig <hch@...radead.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Yu Kuai <yukuai3@...wei.com>, hch@...radead.org,
        darrick.wong@...cle.com, linux-xfs@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        yi.zhang@...wei.com
Subject: Re: [RFC PATCH] iomap: add support to track dirty state of sub pages

On Thu, Jul 30, 2020 at 04:19:34AM +0100, Matthew Wilcox wrote:
> On Thu, Jul 30, 2020 at 09:19:01AM +0800, Yu Kuai wrote:
> > +++ b/fs/iomap/buffered-io.c
> > @@ -29,7 +29,9 @@ struct iomap_page {
> >  	atomic_t		read_count;
> >  	atomic_t		write_count;
> >  	spinlock_t		uptodate_lock;
> > +	spinlock_t		dirty_lock;
> 
> No need for a separate spinlock.  Just rename uptodate_lock.  Maybe
> 'bitmap_lock'.

Agreed.

> 
> >  	DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
> > +	DECLARE_BITMAP(dirty, PAGE_SIZE / 512);
> 
> This is inefficient and poses difficulties for the THP patchset.
> Maybe let the discussion on removing the ->uptodate array finish
> before posting another patch for review?

I really don't think we can kill the uptodate bit.   But what we can
do is have on bitmap array (flex size as in your prep patches) and just
alternating bits for uptodate and dirty.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ