All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>, Jens Axboe <axboe@kernel.dk>
Cc: David Howells <dhowells@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: linux-next: manual merge of the akpm-current tree with the block tree
Date: Thu, 15 Oct 2020 17:27:21 +1100	[thread overview]
Message-ID: <20201015172721.31ef7d5e@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3015 bytes --]

Hi all,

Today's linux-next merge of the akpm-current tree got a conflict in:

  mm/readahead.c

between commit:

  fd0ec96ec35d ("readahead: use limited read-ahead to satisfy read")

from the block tree and commits:

  16681dc9dd92 ("mm/readahead: pass readahead_control to force_page_cache_ra")
  f65bd470e7ed ("mm/readahead: add page_cache_sync_ra and page_cache_async_ra")

from the akpm-current tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc mm/readahead.c
index e5975f4e0ee5,c6ffb76827da..000000000000
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@@ -548,42 -545,23 +545,29 @@@ readit
  		}
  	}
  
- 	ra_submit(ra, mapping, filp);
+ 	ractl->_index = ra->start;
+ 	do_page_cache_ra(ractl, ra->size, ra->async_size);
  }
  
- /**
-  * page_cache_sync_readahead - generic file readahead
-  * @mapping: address_space which holds the pagecache and I/O vectors
-  * @ra: file_ra_state which holds the readahead state
-  * @filp: passed on to ->readpage() and ->readpages()
-  * @index: Index of first page to be read.
-  * @req_count: Total number of pages being read by the caller.
-  *
-  * page_cache_sync_readahead() should be called when a cache miss happened:
-  * it will submit the read.  The readahead logic may decide to piggyback more
-  * pages onto the read request if access patterns suggest it will improve
-  * performance.
-  */
- void page_cache_sync_readahead(struct address_space *mapping,
- 			       struct file_ra_state *ra, struct file *filp,
- 			       pgoff_t index, unsigned long req_count)
+ void page_cache_sync_ra(struct readahead_control *ractl,
+ 		struct file_ra_state *ra, unsigned long req_count)
  {
- 	bool do_forced_ra = filp && (filp->f_mode & FMODE_RANDOM);
 -	/* no read-ahead */
 -	if (!ra->ra_pages)
 -		return;
++	bool do_forced_ra = ractl->file && (ractl->file->f_mode & FMODE_RANDOM);
  
 -	if (blk_cgroup_congested())
 -		return;
 +	/*
 +	 * Even if read-ahead is disabled, start this request as read-ahead.
 +	 * This makes regular read-ahead disabled use the same path as normal
 +	 * reads, instead of having to punt to ->readpage() manually. We limit
 +	 * ourselves to 1 page for this case, to avoid causing problems if
 +	 * we're congested or tight on memory.
 +	 */
 +	if (!ra->ra_pages || blk_cgroup_congested()) {
 +		req_count = 1;
 +		do_forced_ra = true;
 +	}
  
 -	/* be dumb */
 -	if (ractl->file && (ractl->file->f_mode & FMODE_RANDOM)) {
 +	if (do_forced_ra) {
- 		force_page_cache_readahead(mapping, filp, index, req_count);
+ 		force_page_cache_ra(ractl, ra, req_count);
  		return;
  	}
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2020-10-15  6:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15  6:27 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-02  5:40 linux-next: manual merge of the akpm-current tree with the block tree Stephen Rothwell
2021-04-07  9:18 Stephen Rothwell
2021-03-18  6:17 Stephen Rothwell
2021-03-18 17:54 ` Shakeel Butt
2021-03-18 18:19   ` Jens Axboe
2020-11-17  5:05 Stephen Rothwell
2020-09-25  9:57 Stephen Rothwell
2019-05-03  9:10 Stephen Rothwell
2019-05-03 12:35 ` Amir Goldstein
2018-10-02  7:21 Stephen Rothwell
2018-08-13  7:51 Stephen Rothwell
2018-08-02  8:31 Stephen Rothwell
2018-03-19  6:36 Stephen Rothwell
2016-07-13  6:14 Stephen Rothwell
2016-07-13 16:31 ` Jens Axboe
2015-12-07  8:12 Stephen Rothwell
2015-12-07 19:44 ` Andrew Morton
2015-12-07 20:24   ` Stephen Rothwell
2015-11-01 15:51 Stephen Rothwell
2015-11-01 16:04 ` kbuild test robot
2015-11-01 16:05 ` kbuild test robot
2015-11-01 18:38 ` Mel Gorman
2015-11-01 21:51   ` Stephen Rothwell
2015-01-21  7:14 Stephen Rothwell
2014-07-02  6:06 Stephen Rothwell
2013-11-05  6:29 Stephen Rothwell
2013-11-05  6:25 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201015172721.31ef7d5e@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.