public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
To: Cyril Hrubis <chrubis-AlSwsSmVLrQ@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	Nikolay Borisov <kernel-6AxghH7DbtA@public.gmane.org>
Subject: Re: Possible bug - LTP failure for memcg
Date: Thu, 14 May 2015 11:23:01 +0200	[thread overview]
Message-ID: <20150514092301.GB6799@dhcp22.suse.cz> (raw)
In-Reply-To: <20150514092145.GA6799-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>

Cyril, what about this to fix the rounding issue?
---
From b83d740193490d78547197f47eee918732ed1f60 Mon Sep 17 00:00:00 2001
From: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
Date: Thu, 14 May 2015 11:08:20 +0200
Subject: [PATCH] controllers/memcg: Fix limit alignment expectations

since 3e32cb2e0a12 ("mm: memcontrol: lockless page counters") kernel
commit the limit_in_bytes is round down rather than up. This behavior
change has been discussed during the review and it was considered a
reasonable so fix the test accordingly.

While we are at it remove the test case 24 as it doesn't really test
anything more than test case 22.

Signed-off-by: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
---
 .../kernel/controllers/memcg/functional/memcg_function_test.sh   | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
index cfc75fa730df..e3baf9d032f6 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
@@ -158,17 +158,12 @@ testcase_21()
 # Case 22 - 24: Test limit_in_bytes will be aligned to PAGESIZE
 testcase_22()
 {
-	test_limit_in_bytes $((PAGESIZE-1)) $PAGESIZE 0
+	test_limit_in_bytes $((PAGESIZE-1)) 0 0
 }
 
 testcase_23()
 {
-	test_limit_in_bytes $((PAGESIZE+1)) $((PAGESIZE*2)) 0
-}
-
-testcase_24()
-{
-	test_limit_in_bytes 1 $PAGESIZE 0
+	test_limit_in_bytes $((PAGESIZE+1)) $((PAGESIZE)) 0
 }
 
 # Case 25 - 28: Test invaild memory.limit_in_bytes
-- 
2.1.4

-- 
Michal Hocko
SUSE Labs

  parent reply	other threads:[~2015-05-14  9:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 15:29 Possible bug - LTP failure for memcg Nikolay Borisov
2015-05-14  9:21 ` Michal Hocko
     [not found]   ` <20150514092145.GA6799-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-05-14  9:23     ` Michal Hocko [this message]
2015-05-14 10:35       ` Cyril Hrubis
2015-05-14 11:31         ` Michal Hocko
     [not found]           ` <20150514113101.GD6799-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-05-14 12:36             ` Cyril Hrubis
2015-05-14 10:31     ` Cyril Hrubis
     [not found]       ` <20150514103148.GA5066-J5syqNJeCN4b1SvskN2V4Q@public.gmane.org>
2015-05-14 11:56         ` Michal Hocko
     [not found]           ` <20150514115641.GE6799-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-05-14 12:01             ` Cyril Hrubis
     [not found]               ` <20150514120142.GG5066-J5syqNJeCN4b1SvskN2V4Q@public.gmane.org>
2015-05-14 12:12                 ` Michal Hocko
2015-05-14 12:38                   ` Cyril Hrubis
2015-05-14 14:30                     ` Michal Hocko
     [not found]                       ` <20150514143039.GI6799-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-05-14 14:44                         ` Cyril Hrubis
2015-05-14 14:49                           ` Michal Hocko
     [not found]                             ` <20150514144949.GJ6799-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-05-14 15:27                               ` Cyril Hrubis
     [not found] ` <55536DC9.90200-6AxghH7DbtA@public.gmane.org>
2015-05-14 12:09   ` Michal Hocko

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=20150514092301.GB6799@dhcp22.suse.cz \
    --to=mhocko-alswssmvlrq@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=chrubis-AlSwsSmVLrQ@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=kernel-6AxghH7DbtA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.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