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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 09 Feb 2023 15:06:59 +0000
From:   David Howells <dhowells@...hat.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     dhowells@...hat.com, Jens Axboe <axboe@...nel.dk>,
        Al Viro <viro@...iv.linux.org.uk>,
        Christoph Hellwig <hch@...radead.org>, Jan Kara <jack@...e.cz>,
        Jeff Layton <jlayton@...nel.org>,
        David Hildenbrand <david@...hat.com>,
        Jason Gunthorpe <jgg@...dia.com>,
        Logan Gunthorpe <logang@...tatee.com>,
        Hillf Danton <hdanton@...a.com>, linux-fsdevel@...r.kernel.org,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org,
        syzbot+a440341a59e3b7142895@...kaller.appspotmail.com,
        Christoph Hellwig <hch@....de>,
        John Hubbard <jhubbard@...dia.com>
Subject: Re: [PATCH v13 01/12] splice: Fix O_DIRECT file read splice to avoid reversion of ITER_PIPE

Matthew Wilcox <willy@...radead.org> wrote:

> On Thu, Feb 09, 2023 at 10:29:43AM +0000, David Howells wrote:
> > +	npages = alloc_pages_bulk_list(GFP_USER, npages, &pages);
> 
> Please don't use alloc_pages_bulk_list().  If nobody uses it, it can go
> away again soon.  Does alloc_pages_bulk_array() work for you?  It's
> faster.

Sure.

> > +	/* Free any pages that didn't get touched at all. */
> > +	for (; reclaim >= PAGE_SIZE; reclaim -= PAGE_SIZE)
> > +		__free_page(bv[--npages].bv_page);
> 
> If you have that array, you can then use release_pages() to free
> them, which will be faster.

Um.  I would normally overlay the array on end of the bvec[] so that I could
save on an allocation (I have to fill in the bvec[] anyway) - which means I
wouldn't still have the array at release time.  But in this case I can make an
exception, though I would've thought that the expectation would be that all
the requested data would be fetched.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ