linux-next.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>, Tejun Heo <tj@kernel.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michal Hocko <mhocko@suse.cz>
Subject: linux-next: manual merge of the akpm-current tree with the cgroup tree
Date: Wed, 14 May 2014 17:22:40 +1000	[thread overview]
Message-ID: <20140514172240.3d3eeba5@canb.auug.org.au> (raw)

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

Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in
mm/memcontrol.c between commit 6770c64e5c8d ("cgroup: replace
cftype->trigger() with cftype->write()") from the cgroup tree and
commits 15aa061d2994 ("memcg: deprecate memory.force_empty knob") and
2423e4fd8967 ("memcg-deprecate-memoryforce_empty-knob-fix") from the
akpm-current tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc mm/memcontrol.c
index 66447745d0c0,2cb81478d30c..000000000000
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@@ -833,9 -829,9 +826,9 @@@ retry
  	 * we will to add it back at the end of reclaim to its correct
  	 * position in the tree.
  	 */
- 	__mem_cgroup_remove_exceeded(mz->memcg, mz, mctz);
+ 	__mem_cgroup_remove_exceeded(mz, mctz);
  	if (!res_counter_soft_limit_excess(&mz->memcg->res) ||
 -		!css_tryget(&mz->memcg->css))
 +	    !css_tryget_online(&mz->memcg->css))
  		goto retry;
  done:
  	return mz;
@@@ -4895,7 -4795,11 +4794,11 @@@ static ssize_t mem_cgroup_force_empty_w
  
  	if (mem_cgroup_is_root(memcg))
  		return -EINVAL;
+ 	pr_info_once("%s (%d): memory.force_empty is deprecated and will be "
+ 		     "removed.  Let us know if it is needed in your usecase at "
+ 		     "linux-mm@kvack.org\n",
+ 		     current->comm, task_pid_nr(current));
 -	return mem_cgroup_force_empty(memcg);
 +	return mem_cgroup_force_empty(memcg) ?: nbytes;
  }
  
  static u64 mem_cgroup_hierarchy_read(struct cgroup_subsys_state *css,
@@@ -5176,8 -5080,26 +5080,26 @@@ static ssize_t mem_cgroup_write(struct 
  		else
  			return -EINVAL;
  		break;
+ 	case RES_LOW_LIMIT:
+ 		if (mem_cgroup_is_root(memcg)) { /* Can't set limit on root */
+ 			ret = -EINVAL;
+ 			break;
+ 		}
+ 		ret = res_counter_memparse_write_strategy(buffer, &val);
+ 		if (ret)
+ 			break;
+ 		if (type == _MEM) {
+ 			ret = res_counter_set_low_limit(&memcg->res, val);
+ 			break;
+ 		}
+ 		/*
+ 		 * memsw low limit doesn't make any sense and kmem is not
+ 		 * implemented yet - if ever
+ 		 */
+ 		return -EINVAL;
+ 
  	case RES_SOFT_LIMIT:
 -		ret = res_counter_memparse_write_strategy(buffer, &val);
 +		ret = res_counter_memparse_write_strategy(buf, &val);
  		if (ret)
  			break;
  		/*
@@@ -6117,9 -6020,15 +6024,15 @@@ static struct cftype mem_cgroup_files[
  		.read_u64 = mem_cgroup_read_u64,
  	},
  	{
+ 		.name = "low_limit_in_bytes",
+ 		.private = MEMFILE_PRIVATE(_MEM, RES_LOW_LIMIT),
+ 		.write_string = mem_cgroup_write,
+ 		.read_u64 = mem_cgroup_read_u64,
+ 	},
+ 	{
  		.name = "soft_limit_in_bytes",
  		.private = MEMFILE_PRIVATE(_MEM, RES_SOFT_LIMIT),
 -		.write_string = mem_cgroup_write,
 +		.write = mem_cgroup_write,
  		.read_u64 = mem_cgroup_read_u64,
  	},
  	{
@@@ -6134,7 -6043,8 +6047,8 @@@
  	},
  	{
  		.name = "force_empty",
+ 		.flags = CFTYPE_INSANE,
 -		.trigger = mem_cgroup_force_empty_write,
 +		.write = mem_cgroup_force_empty_write,
  	},
  	{
  		.name = "use_hierarchy",

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2014-05-14  7:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14  7:22 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-08-19  8:43 linux-next: manual merge of the akpm-current tree with the cgroup tree Stephen Rothwell
2014-02-26  7:43 Stephen Rothwell
2014-02-14  4:34 Stephen Rothwell
2014-02-14  8:33 ` Michal Hocko
2014-02-14  8:57   ` Michal Hocko
2014-02-14  4:25 Stephen Rothwell
2014-02-14  4:30 ` Stephen Rothwell
2013-09-25  3:57 Stephen Rothwell
2013-08-12  6:07 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=20140514172240.3d3eeba5@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=tj@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).