Re: [PATCH v3 bpf-next 02/10] lib/buildid: add single page-based file reader abstraction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 07, 2024 at 10:19:11AM -0700, Shakeel Butt wrote:
> On Wed, Aug 07, 2024 at 04:28:53PM GMT, Matthew Wilcox wrote:
> > On Tue, Jul 30, 2024 at 01:39:06PM -0700, Andrii Nakryiko wrote:
> > > +	union {
> > > +		struct {
> > > +			struct address_space *mapping;
> > > +			struct page *page;
> > 
> > NAK.  All the page-based interfaces are deprecated.  Only we can't mark
> > them as deprecated because our tooling is a pile of crap.
> > 
> > > +			void *page_addr;
> > > +			u64 file_off;
> > 
> > loff_t pos.
> > 
> > > +	r->page = find_get_page(r->mapping, pg_off);
> > 
> > r->folio = read_mapping_folio(r->mapping, r->pos / PAGE_SIZE, ...)
> > 
> > OK, for network filesystems, you're going to need to retain the struct
> > file that's used to access them.  So maybe this becomes
> > 	read_mapping_folio(r->file->f_mapping, r->pos, r->file)
> 
> This code path can be called from non-sleepable context. What would be
> the appropriate way to get the folio in that case?

There isn't.  If there's no folio, or the folio isn't uptodate, we need
to sleep to wait for I/O.  We can't busy-wait for I/O.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux