linux-kernel.vger.kernel.org archive mirror
 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: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Josef Bacik <josef@toxicpanda.com>,
	Johannes Weiner <hannes@cmpxchg.org>
Subject: linux-next: manual merge of the akpm-current tree with the block tree
Date: Tue, 2 Oct 2018 17:21:13 +1000	[thread overview]
Message-ID: <20181002172113.33dfbd9d@canb.auug.org.au> (raw)

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

Hi Andrew,

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

  block/blk-iolatency.c

between commit:

  1fa2840e56f9 ("blk-iolatency: use a percentile approache for ssd's")

from the block tree and commit:

  07360251b445 ("sched-loadavg-consolidate-load_int-load_frac-calc_load-fix")
  1ccc64569a48 ("sched-loadavg-consolidate-load_int-load_frac-calc_load-fix-fix")

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 block/blk-iolatency.c
index 35c48d7b8f78,8793f1344e11..000000000000
--- a/block/blk-iolatency.c
+++ b/block/blk-iolatency.c
@@@ -186,80 -172,6 +186,81 @@@ static inline struct blkcg_gq *lat_to_b
  	return pd_to_blkg(&iolat->pd);
  }
  
 +static inline void latency_stat_init(struct iolatency_grp *iolat,
 +				     struct latency_stat *stat)
 +{
 +	if (iolat->ssd) {
 +		stat->ps.total = 0;
 +		stat->ps.missed = 0;
 +	} else
 +		blk_rq_stat_init(&stat->rqs);
 +}
 +
 +static inline void latency_stat_sum(struct iolatency_grp *iolat,
 +				    struct latency_stat *sum,
 +				    struct latency_stat *stat)
 +{
 +	if (iolat->ssd) {
 +		sum->ps.total += stat->ps.total;
 +		sum->ps.missed += stat->ps.missed;
 +	} else
 +		blk_rq_stat_sum(&sum->rqs, &stat->rqs);
 +}
 +
 +static inline void latency_stat_record_time(struct iolatency_grp *iolat,
 +					    u64 req_time)
 +{
 +	struct latency_stat *stat = get_cpu_ptr(iolat->stats);
 +	if (iolat->ssd) {
 +		if (req_time >= iolat->min_lat_nsec)
 +			stat->ps.missed++;
 +		stat->ps.total++;
 +	} else
 +		blk_rq_stat_add(&stat->rqs, req_time);
 +	put_cpu_ptr(stat);
 +}
 +
 +static inline bool latency_sum_ok(struct iolatency_grp *iolat,
 +				  struct latency_stat *stat)
 +{
 +	if (iolat->ssd) {
 +		u64 thresh = div64_u64(stat->ps.total, 10);
 +		thresh = max(thresh, 1ULL);
 +		return stat->ps.missed < thresh;
 +	}
 +	return stat->rqs.mean <= iolat->min_lat_nsec;
 +}
 +
 +static inline u64 latency_stat_samples(struct iolatency_grp *iolat,
 +				       struct latency_stat *stat)
 +{
 +	if (iolat->ssd)
 +		return stat->ps.total;
 +	return stat->rqs.nr_samples;
 +}
 +
 +static inline void iolat_update_total_lat_avg(struct iolatency_grp *iolat,
 +					      struct latency_stat *stat)
 +{
 +	int exp_idx;
 +
 +	if (iolat->ssd)
 +		return;
 +
 +	/*
- 	 * CALC_LOAD takes in a number stored in fixed point representation.
++	 * calc_load takes in a number stored in fixed point representation.
 +	 * Because we are using this for IO time in ns, the values stored
 +	 * are significantly larger than the FIXED_1 denominator (2048).
 +	 * Therefore, rounding errors in the calculation are negligible and
 +	 * can be ignored.
 +	 */
 +	exp_idx = min_t(int, BLKIOLATENCY_NR_EXP_FACTORS - 1,
 +			div64_u64(iolat->cur_win_nsec,
 +				  BLKIOLATENCY_EXP_BUCKET_SIZE));
- 	CALC_LOAD(iolat->lat_avg, iolatency_exp_factors[exp_idx], stat->rqs.mean);
++	iolat->lat_avg = calc_load(iolat->lat_avg,
++				   iolatency_exp_factors[exp_idx], stat->rqs.mean);
 +}
 +
  static inline bool iolatency_may_queue(struct iolatency_grp *iolat,
  				       wait_queue_entry_t *wait,
  				       bool first_block)

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

             reply	other threads:[~2018-10-02  7:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02  7:21 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-10-15  6:27 Stephen Rothwell
2020-09-25  9:57 Stephen Rothwell
2019-05-03  9:10 Stephen Rothwell
2019-05-03 12:35 ` Amir Goldstein
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=20181002172113.33dfbd9d@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=hannes@cmpxchg.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).