diff options
author | Petr Vorel <petr.vorel@gmail.com> | 2021-12-29 21:49:21 +0100 |
---|---|---|
committer | Petr Vorel <petr.vorel@gmail.com> | 2021-12-29 22:03:52 +0100 |
commit | d56165f3e0afe233d96ca6fce4b1c5fd4b84750d (patch) | |
tree | 4cb0063d6a4a9274302097471e46267a79c0e5bc /testcases/kernel/mem | |
parent | 10cacbe529a3e8bf0601ae4bbc683eae1f46ef8a (diff) | |
download | ltp-d56165f3e0afe233d96ca6fce4b1c5fd4b84750d.tar.gz |
swapping01.c: Add git tag, docparse, SPDX
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Diffstat (limited to 'testcases/kernel/mem')
-rw-r--r-- | testcases/kernel/mem/swapping/swapping01.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/testcases/kernel/mem/swapping/swapping01.c b/testcases/kernel/mem/swapping/swapping01.c index 498f502c1..6db0f9866 100644 --- a/testcases/kernel/mem/swapping/swapping01.c +++ b/testcases/kernel/mem/swapping/swapping01.c @@ -1,27 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2012-2017 Red Hat, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See - * the GNU General Public License for more details. */ -/* - * swapping01 - first time swap use results in heavy swapping + +/*\ + * [Description] * - * This case is used for testing upstream commit: 50a1598 + * Detect heavy swapping during first time swap use. + * + * This case is used for testing kernel commit: + * 50a15981a1fa ("[S390] reference bit testing for unmapped pages") * * The upstream commit fixed a issue on s390/x platform that heavy * swapping might occur in some condition, however since the patch * was quite general, this testcase will be run on all supported * platforms to ensure no regression been introduced. * - * Details of the upstream fix: + * Details of the kernel fix: + * * On x86 a page without a mapper is by definition not referenced / old. * The s390 architecture keeps the reference bit in the storage key and * the current code will check the storage key for page without a mapper. @@ -31,11 +27,12 @@ * To avoid this behaviour change page_referenced to query the storage * key only if there is a mapper of the page. * - * Test Strategy: + * [Algorithm] + * * Try to allocate memory which size is slightly larger than current * available memory. After allocation done, continue loop for a while * and calculate the used swap size. The used swap size should be small - * enough, else it indicates that heavy swapping is occured unexpectedly. + * enough, else it indicates that heavy swapping is occurred unexpectedly. */ #include <sys/types.h> @@ -166,4 +163,8 @@ static struct tst_test test = { .needs_root = 1, .forks_child = 1, .test_all = test_swapping, + .tags = (const struct tst_tag[]) { + {"linux-git", "50a15981a1fa"}, + {} + } }; |