2021-06-03 15:00:19

by Dan Schatzberg

[permalink] [raw]
Subject: [PATCH V13 0/3] Charge loop device i/o to issuing cgroup

No significant changes, rebased on Linus's tree.

Jens, this series was intended to go into the mm tree since it had
some conflicts with mm changes. It never got picked up for 5.12 and
the corresponding mm changes are now in linus's tree. This is mostly a
loop change so it feels more appropriate to go through the block tree.
Do you think that makes sense?

Changes since V12:

* Small change to get_mem_cgroup_from_mm to avoid needing
get_active_memcg

Changes since V11:

* Removed WQ_MEM_RECLAIM flag from loop workqueue. Technically, this
can be driven by writeback, but this was causing a warning in xfs
and likely other filesystems aren't equipped to be driven by reclaim
at the VFS layer.
* Included a small fix from Colin Ian King.
* reworked get_mem_cgroup_from_mm to institute the necessary charge
priority.

Changes since V10:

* Added page-cache charging to mm: Charge active memcg when no mm is set

Changes since V9:

* Rebased against linus's branch which now includes Roman Gushchin's
patch this series is based off of

Changes since V8:

* Rebased on top of Roman Gushchin's patch
(https://lkml.org/lkml/2020/8/21/1464) which provides the nesting
support for setting active memcg. Dropped the patch from this series
that did the same thing.

Changes since V7:

* Rebased against linus's branch

Changes since V6:

* Added separate spinlock for worker synchronization
* Minor style changes

Changes since V5:

* Fixed a missing css_put when failing to allocate a worker
* Minor style changes

Changes since V4:

Only patches 1 and 2 have changed.

* Fixed irq lock ordering bug
* Simplified loop detach
* Added support for nesting memalloc_use_memcg

Changes since V3:

* Fix race on loop device destruction and deferred worker cleanup
* Ensure charge on shmem_swapin_page works just like getpage
* Minor style changes

Changes since V2:

* Deferred destruction of workqueue items so in the common case there
is no allocation needed

Changes since V1:

* Split out and reordered patches so cgroup charging changes are
separate from kworker -> workqueue change

* Add mem_css to struct loop_cmd to simplify logic

The loop device runs all i/o to the backing file on a separate kworker
thread which results in all i/o being charged to the root cgroup. This
allows a loop device to be used to trivially bypass resource limits
and other policy. This patch series fixes this gap in accounting.

A simple script to demonstrate this behavior on cgroupv2 machine:

'''
#!/bin/bash
set -e

CGROUP=/sys/fs/cgroup/test.slice
LOOP_DEV=/dev/loop0

if [[ ! -d $CGROUP ]]
then
sudo mkdir $CGROUP
fi

grep oom_kill $CGROUP/memory.events

# Set a memory limit, write more than that limit to tmpfs -> OOM kill
sudo unshare -m bash -c "
echo \$\$ > $CGROUP/cgroup.procs;
echo 0 > $CGROUP/memory.swap.max;
echo 64M > $CGROUP/memory.max;
mount -t tmpfs -o size=512m tmpfs /tmp;
dd if=/dev/zero of=/tmp/file bs=1M count=256" || true

grep oom_kill $CGROUP/memory.events

# Set a memory limit, write more than that limit through loopback
# device -> no OOM kill
sudo unshare -m bash -c "
echo \$\$ > $CGROUP/cgroup.procs;
echo 0 > $CGROUP/memory.swap.max;
echo 64M > $CGROUP/memory.max;
mount -t tmpfs -o size=512m tmpfs /tmp;
truncate -s 512m /tmp/backing_file
losetup $LOOP_DEV /tmp/backing_file
dd if=/dev/zero of=$LOOP_DEV bs=1M count=256;
losetup -D $LOOP_DEV" || true

grep oom_kill $CGROUP/memory.events
'''

Naively charging cgroups could result in priority inversions through
the single kworker thread in the case where multiple cgroups are
reading/writing to the same loop device. This patch series does some
minor modification to the loop driver so that each cgroup can make
forward progress independently to avoid this inversion.

With this patch series applied, the above script triggers OOM kills
when writing through the loop device as expected.

Dan Schatzberg (3):
loop: Use worker per cgroup instead of kworker
mm: Charge active memcg when no mm is set
loop: Charge i/o to mem and blk cg

drivers/block/loop.c | 241 ++++++++++++++++++++++++++++++-------
drivers/block/loop.h | 15 ++-
include/linux/memcontrol.h | 6 +
kernel/cgroup/cgroup.c | 1 +
mm/filemap.c | 2 +-
mm/memcontrol.c | 49 +++++---
mm/shmem.c | 4 +-
7 files changed, 250 insertions(+), 68 deletions(-)

--
2.30.2


2021-06-03 15:00:56

by Dan Schatzberg

[permalink] [raw]
Subject: [PATCH 2/3] mm: Charge active memcg when no mm is set

set_active_memcg() worked for kernel allocations but was silently
ignored for user pages.

This patch establishes a precedence order for who gets charged:

1. If there is a memcg associated with the page already, that memcg is
charged. This happens during swapin.

2. If an explicit mm is passed, mm->memcg is charged. This happens
during page faults, which can be triggered in remote VMs (eg gup).

3. Otherwise consult the current process context. If there is an
active_memcg, use that. Otherwise, current->mm->memcg.

Previously, if a NULL mm was passed to mem_cgroup_charge (case 3) it
would always charge the root cgroup. Now it looks up the active_memcg
first (falling back to charging the root cgroup if not set).

Signed-off-by: Dan Schatzberg <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Acked-by: Chris Down <[email protected]>
Acked-by: Jens Axboe <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
---
mm/filemap.c | 2 +-
mm/memcontrol.c | 48 +++++++++++++++++++++++++++++++-----------------
mm/shmem.c | 4 ++--
3 files changed, 34 insertions(+), 20 deletions(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index 66f7e9fdfbc4..ac82a93d4f38 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -872,7 +872,7 @@ noinline int __add_to_page_cache_locked(struct page *page,
page->index = offset;

if (!huge) {
- error = mem_cgroup_charge(page, current->mm, gfp);
+ error = mem_cgroup_charge(page, NULL, gfp);
if (error)
goto error;
charged = true;
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 64ada9e650a5..26dc2dc0056a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -886,13 +886,24 @@ struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p)
}
EXPORT_SYMBOL(mem_cgroup_from_task);

+static __always_inline struct mem_cgroup *active_memcg(void)
+{
+ if (in_interrupt())
+ return this_cpu_read(int_active_memcg);
+ else
+ return current->active_memcg;
+}
+
/**
* get_mem_cgroup_from_mm: Obtain a reference on given mm_struct's memcg.
* @mm: mm from which memcg should be extracted. It can be NULL.
*
- * Obtain a reference on mm->memcg and returns it if successful. Otherwise
- * root_mem_cgroup is returned. However if mem_cgroup is disabled, NULL is
- * returned.
+ * Obtain a reference on mm->memcg and returns it if successful. If mm
+ * is NULL, then the memcg is chosen as follows:
+ * 1) The active memcg, if set.
+ * 2) current->mm->memcg, if available
+ * 3) root memcg
+ * If mem_cgroup is disabled, NULL is returned.
*/
struct mem_cgroup *get_mem_cgroup_from_mm(struct mm_struct *mm)
{
@@ -901,13 +912,23 @@ struct mem_cgroup *get_mem_cgroup_from_mm(struct mm_struct *mm)
if (mem_cgroup_disabled())
return NULL;

+ /*
+ * Page cache insertions can happen without an
+ * actual mm context, e.g. during disk probing
+ * on boot, loopback IO, acct() writes etc.
+ */
+ if (unlikely(!mm)) {
+ memcg = active_memcg();
+ if (unlikely(memcg)) {
+ /* remote memcg must hold a ref */
+ css_get(&memcg->css);
+ return memcg;
+ }
+ mm = current->mm;
+ }
+
rcu_read_lock();
do {
- /*
- * Page cache insertions can happen without an
- * actual mm context, e.g. during disk probing
- * on boot, loopback IO, acct() writes etc.
- */
if (unlikely(!mm))
memcg = root_mem_cgroup;
else {
@@ -921,14 +942,6 @@ struct mem_cgroup *get_mem_cgroup_from_mm(struct mm_struct *mm)
}
EXPORT_SYMBOL(get_mem_cgroup_from_mm);

-static __always_inline struct mem_cgroup *active_memcg(void)
-{
- if (in_interrupt())
- return this_cpu_read(int_active_memcg);
- else
- return current->active_memcg;
-}
-
static __always_inline bool memcg_kmem_bypass(void)
{
/* Allow remote memcg charging from any context. */
@@ -6541,7 +6554,8 @@ static int __mem_cgroup_charge(struct page *page, struct mem_cgroup *memcg,
* @gfp_mask: reclaim mode
*
* Try to charge @page to the memcg that @mm belongs to, reclaiming
- * pages according to @gfp_mask if necessary.
+ * pages according to @gfp_mask if necessary. if @mm is NULL, try to
+ * charge to the active memcg.
*
* Do not use this for pages allocated for swapin.
*
diff --git a/mm/shmem.c b/mm/shmem.c
index 5d46611cba8d..2e7af1725ff6 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1695,7 +1695,7 @@ static int shmem_swapin_page(struct inode *inode, pgoff_t index,
{
struct address_space *mapping = inode->i_mapping;
struct shmem_inode_info *info = SHMEM_I(inode);
- struct mm_struct *charge_mm = vma ? vma->vm_mm : current->mm;
+ struct mm_struct *charge_mm = vma ? vma->vm_mm : NULL;
struct page *page;
swp_entry_t swap;
int error;
@@ -1816,7 +1816,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
}

sbinfo = SHMEM_SB(inode->i_sb);
- charge_mm = vma ? vma->vm_mm : current->mm;
+ charge_mm = vma ? vma->vm_mm : NULL;

page = pagecache_get_page(mapping, index,
FGP_ENTRY | FGP_HEAD | FGP_LOCK, 0);
--
2.30.2

2021-06-03 15:02:19

by Dan Schatzberg

[permalink] [raw]
Subject: [PATCH 3/3] loop: Charge i/o to mem and blk cg

The current code only associates with the existing blkcg when aio is
used to access the backing file. This patch covers all types of i/o to
the backing file and also associates the memcg so if the backing file is
on tmpfs, memory is charged appropriately.

This patch also exports cgroup_get_e_css and int_active_memcg so it
can be used by the loop module.

Signed-off-by: Dan Schatzberg <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Acked-by: Jens Axboe <[email protected]>
---
drivers/block/loop.c | 61 +++++++++++++++++++++++++-------------
drivers/block/loop.h | 3 +-
include/linux/memcontrol.h | 6 ++++
kernel/cgroup/cgroup.c | 1 +
mm/memcontrol.c | 1 +
5 files changed, 51 insertions(+), 21 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 935edcf7c7b1..b38115c91288 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -78,6 +78,7 @@
#include <linux/uio.h>
#include <linux/ioprio.h>
#include <linux/blk-cgroup.h>
+#include <linux/sched/mm.h>

#include "loop.h"

@@ -516,8 +517,6 @@ static void lo_rw_aio_complete(struct kiocb *iocb, long ret, long ret2)
{
struct loop_cmd *cmd = container_of(iocb, struct loop_cmd, iocb);

- if (cmd->css)
- css_put(cmd->css);
cmd->ret = ret;
lo_rw_aio_do_completion(cmd);
}
@@ -578,8 +577,6 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
cmd->iocb.ki_complete = lo_rw_aio_complete;
cmd->iocb.ki_flags = IOCB_DIRECT;
cmd->iocb.ki_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
- if (cmd->css)
- kthread_associate_blkcg(cmd->css);

if (rw == WRITE)
ret = call_write_iter(file, &cmd->iocb, &iter);
@@ -587,7 +584,6 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
ret = call_read_iter(file, &cmd->iocb, &iter);

lo_rw_aio_do_completion(cmd);
- kthread_associate_blkcg(NULL);

if (ret != -EIOCBQUEUED)
cmd->iocb.ki_complete(&cmd->iocb, ret, 0);
@@ -928,7 +924,7 @@ struct loop_worker {
struct list_head cmd_list;
struct list_head idle_list;
struct loop_device *lo;
- struct cgroup_subsys_state *css;
+ struct cgroup_subsys_state *blkcg_css;
unsigned long last_ran_at;
};

@@ -943,7 +939,7 @@ static void loop_queue_work(struct loop_device *lo, struct loop_cmd *cmd)

spin_lock_irq(&lo->lo_work_lock);

- if (!cmd->css)
+ if (!cmd->blkcg_css)
goto queue_work;

node = &lo->worker_tree.rb_node;
@@ -951,10 +947,10 @@ static void loop_queue_work(struct loop_device *lo, struct loop_cmd *cmd)
while (*node) {
parent = *node;
cur_worker = container_of(*node, struct loop_worker, rb_node);
- if (cur_worker->css == cmd->css) {
+ if (cur_worker->blkcg_css == cmd->blkcg_css) {
worker = cur_worker;
break;
- } else if ((long)cur_worker->css < (long)cmd->css) {
+ } else if ((long)cur_worker->blkcg_css < (long)cmd->blkcg_css) {
node = &(*node)->rb_left;
} else {
node = &(*node)->rb_right;
@@ -966,13 +962,18 @@ static void loop_queue_work(struct loop_device *lo, struct loop_cmd *cmd)
worker = kzalloc(sizeof(struct loop_worker), GFP_NOWAIT | __GFP_NOWARN);
/*
* In the event we cannot allocate a worker, just queue on the
- * rootcg worker
+ * rootcg worker and issue the I/O as the rootcg
*/
- if (!worker)
+ if (!worker) {
+ cmd->blkcg_css = NULL;
+ if (cmd->memcg_css)
+ css_put(cmd->memcg_css);
+ cmd->memcg_css = NULL;
goto queue_work;
+ }

- worker->css = cmd->css;
- css_get(worker->css);
+ worker->blkcg_css = cmd->blkcg_css;
+ css_get(worker->blkcg_css);
INIT_WORK(&worker->work, loop_workfn);
INIT_LIST_HEAD(&worker->cmd_list);
INIT_LIST_HEAD(&worker->idle_list);
@@ -1291,7 +1292,7 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
idle_list) {
list_del(&worker->idle_list);
rb_erase(&worker->rb_node, &lo->worker_tree);
- css_put(worker->css);
+ css_put(worker->blkcg_css);
kfree(worker);
}
spin_unlock_irq(&lo->lo_work_lock);
@@ -2096,13 +2097,18 @@ static blk_status_t loop_queue_rq(struct blk_mq_hw_ctx *hctx,
}

/* always use the first bio's css */
+ cmd->blkcg_css = NULL;
+ cmd->memcg_css = NULL;
#ifdef CONFIG_BLK_CGROUP
- if (cmd->use_aio && rq->bio && rq->bio->bi_blkg) {
- cmd->css = &bio_blkcg(rq->bio)->css;
- css_get(cmd->css);
- } else
+ if (rq->bio && rq->bio->bi_blkg) {
+ cmd->blkcg_css = &bio_blkcg(rq->bio)->css;
+#ifdef CONFIG_MEMCG
+ cmd->memcg_css =
+ cgroup_get_e_css(cmd->blkcg_css->cgroup,
+ &memory_cgrp_subsys);
+#endif
+ }
#endif
- cmd->css = NULL;
loop_queue_work(lo, cmd);

return BLK_STS_OK;
@@ -2114,13 +2120,28 @@ static void loop_handle_cmd(struct loop_cmd *cmd)
const bool write = op_is_write(req_op(rq));
struct loop_device *lo = rq->q->queuedata;
int ret = 0;
+ struct mem_cgroup *old_memcg = NULL;

if (write && (lo->lo_flags & LO_FLAGS_READ_ONLY)) {
ret = -EIO;
goto failed;
}

+ if (cmd->blkcg_css)
+ kthread_associate_blkcg(cmd->blkcg_css);
+ if (cmd->memcg_css)
+ old_memcg = set_active_memcg(
+ mem_cgroup_from_css(cmd->memcg_css));
+
ret = do_req_filebacked(lo, rq);
+
+ if (cmd->blkcg_css)
+ kthread_associate_blkcg(NULL);
+
+ if (cmd->memcg_css) {
+ set_active_memcg(old_memcg);
+ css_put(cmd->memcg_css);
+ }
failed:
/* complete non-aio request */
if (!cmd->use_aio || ret) {
@@ -2199,7 +2220,7 @@ static void loop_free_idle_workers(struct timer_list *timer)
break;
list_del(&worker->idle_list);
rb_erase(&worker->rb_node, &lo->worker_tree);
- css_put(worker->css);
+ css_put(worker->blkcg_css);
kfree(worker);
}
if (!list_empty(&lo->idle_worker_list))
diff --git a/drivers/block/loop.h b/drivers/block/loop.h
index 9289c1cd6374..cd24a81e00e6 100644
--- a/drivers/block/loop.h
+++ b/drivers/block/loop.h
@@ -76,7 +76,8 @@ struct loop_cmd {
long ret;
struct kiocb iocb;
struct bio_vec *bvec;
- struct cgroup_subsys_state *css;
+ struct cgroup_subsys_state *blkcg_css;
+ struct cgroup_subsys_state *memcg_css;
};

/* Support for loadable transfer modules */
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index c193be760709..542d9cae336b 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1255,6 +1255,12 @@ static inline struct mem_cgroup *get_mem_cgroup_from_mm(struct mm_struct *mm)
return NULL;
}

+static inline
+struct mem_cgroup *mem_cgroup_from_css(struct cgroup_subsys_state *css)
+{
+ return NULL;
+}
+
static inline void mem_cgroup_put(struct mem_cgroup *memcg)
{
}
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 21ecc6ee6a6d..9cc8c3a686b1 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -577,6 +577,7 @@ struct cgroup_subsys_state *cgroup_get_e_css(struct cgroup *cgrp,
rcu_read_unlock();
return css;
}
+EXPORT_SYMBOL_GPL(cgroup_get_e_css);

static void cgroup_get_live(struct cgroup *cgrp)
{
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 26dc2dc0056a..8a8222df44b5 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -78,6 +78,7 @@ struct mem_cgroup *root_mem_cgroup __read_mostly;

/* Active memory cgroup to use from an interrupt context */
DEFINE_PER_CPU(struct mem_cgroup *, int_active_memcg);
+EXPORT_PER_CPU_SYMBOL_GPL(int_active_memcg);

/* Socket memory accounting disabled? */
static bool cgroup_memory_nosocket;
--
2.30.2

2021-06-03 16:57:07

by Shakeel Butt

[permalink] [raw]
Subject: Re: [PATCH 2/3] mm: Charge active memcg when no mm is set

On Thu, Jun 3, 2021 at 7:57 AM Dan Schatzberg <[email protected]> wrote:
>
> set_active_memcg() worked for kernel allocations but was silently
> ignored for user pages.
>
> This patch establishes a precedence order for who gets charged:
>
> 1. If there is a memcg associated with the page already, that memcg is
> charged. This happens during swapin.
>
> 2. If an explicit mm is passed, mm->memcg is charged. This happens
> during page faults, which can be triggered in remote VMs (eg gup).
>
> 3. Otherwise consult the current process context. If there is an
> active_memcg, use that. Otherwise, current->mm->memcg.
>
> Previously, if a NULL mm was passed to mem_cgroup_charge (case 3) it
> would always charge the root cgroup. Now it looks up the active_memcg
> first (falling back to charging the root cgroup if not set).
>
> Signed-off-by: Dan Schatzberg <[email protected]>
> Acked-by: Johannes Weiner <[email protected]>
> Acked-by: Tejun Heo <[email protected]>
> Acked-by: Chris Down <[email protected]>
> Acked-by: Jens Axboe <[email protected]>
> Reviewed-by: Shakeel Butt <[email protected]>

Can you please rebase over the latest mm tree? Specifically over
Muchun's patch "mm: memcontrol: bail out early when !mm in
get_mem_cgroup_from_mm".

2021-06-07 03:12:18

by kernel test robot

[permalink] [raw]
Subject: [loop] 1da9d8fdd7: ltp.uevent01.fail



Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: 1da9d8fdd7f2153e0f9ff8e64fc5d36a246ddf76 ("[PATCH 3/3] loop: Charge i/o to mem and blk cg")
url: https://github.com/0day-ci/linux/commits/Dan-Schatzberg/Charge-loop-device-i-o-to-issuing-cgroup/20210603-225820
base: https://git.kernel.org/cgit/linux/kernel/git/axboe/linux-block.git for-next

in testcase: ltp
version: ltp-x86_64-14c1f76-1_20210522
with following parameters:

test: uevent
ucode: 0x21

test-description: The LTP testsuite contains a collection of tools for testing the Linux kernel and related features.
test-url: http://linux-test-project.github.io/


on test machine: 4 threads 1 sockets Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz with 8G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):




If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>

2021-06-05 03:18:51 ln -sf /usr/bin/genisoimage /usr/bin/mkisofs
2021-06-05 03:18:51 ./runltp -f uevent
INFO: creating /lkp/benchmarks/ltp/output directory
INFO: creating /lkp/benchmarks/ltp/results directory
Checking for required user/group ids

'nobody' user id and group found.
'bin' user id and group found.
'daemon' user id and group found.
Users group found.
Sys group found.
Required users/groups exist.
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.

/etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

uname:
Linux lkp-ivb-d02 5.13.0-rc3-00076-g1da9d8fdd7f2 #1 SMP Fri Jun 4 03:34:59 CST 2021 x86_64 GNU/Linux

/proc/cmdline
ip=::::lkp-ivb-d02::dhcp root=/dev/ram0 user=lkp job=/lkp/jobs/scheduled/lkp-ivb-d02/ltp-uevent-ucode=0x21-debian-10.4-x86_64-20200603.cgz-1da9d8fdd7f2153e0f9ff8e64fc5d36a246ddf76-20210605-2734-1xeoxlg-4.yaml ARCH=x86_64 kconfig=x86_64-rhel-8.3 branch=linux-review/Dan-Schatzberg/Charge-loop-device-i-o-to-issuing-cgroup/20210603-225820 commit=1da9d8fdd7f2153e0f9ff8e64fc5d36a246ddf76 BOOT_IMAGE=/pkg/linux/x86_64-rhel-8.3/gcc-9/1da9d8fdd7f2153e0f9ff8e64fc5d36a246ddf76/vmlinuz-5.13.0-rc3-00076-g1da9d8fdd7f2 max_uptime=2100 RESULT_ROOT=/result/ltp/uevent-ucode=0x21/lkp-ivb-d02/debian-10.4-x86_64-20200603.cgz/x86_64-rhel-8.3/gcc-9/1da9d8fdd7f2153e0f9ff8e64fc5d36a246ddf76/3 LKP_SERVER=internal-lkp-server nokaslr selinux=0 debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw

Gnu C gcc (Debian 8.3.0-6) 8.3.0
Clang
Gnu make 4.2.1
util-linux 2.33.1
mount linux 2.33.1 (libmount 2.33.1: selinux, smack, btrfs, namespaces, assert, debug)
modutils 26
e2fsprogs 1.44.5
Linux C Library > libc.2.28
Dynamic linker (ldd) 2.28
Procps 3.3.15
Net-tools 2.10-alpha
iproute2 iproute2-ss190107
iputils iputils-s20180629
ethtool 4.19
Kbd 119:
Sh-utils 8.30
Modules Loaded netconsole btrfs blake2b_generic xor zstd_compress raid6_pq libcrc32c sd_mod t10_pi sg intel_rapl_msr intel_rapl_common i915 x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel intel_gtt drm_kms_helper kvm syscopyarea sysfillrect sysimgblt fb_sys_fops irqbypass crct10dif_pclmul ahci crc32_pclmul crc32c_intel ghash_clmulni_intel libahci rapl joydev intel_cstate ipmi_devintf drm ipmi_msghandler mei_me mei libata intel_uncore video ip_tables

free reports:
total used free shared buff/cache available
Mem: 8024620 291912 5161520 13384 2571188 5056964
Swap: 0 0 0

cpuinfo:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 36 bits physical, 48 bits virtual
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Model name: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
Stepping: 9
CPU MHz: 3292.448
CPU max MHz: 3300.0000
CPU min MHz: 1600.0000
BogoMIPS: 6584.89
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm cpuid_fault epb pti tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm arat pln pts

AppArmor enabled

SELinux mode: unknown
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND: /lkp/benchmarks/ltp/bin/ltp-pan -e -S -a 2428 -n 2428 -p -f /tmp/ltp-XXmKleoOjs/alltests -l /lkp/benchmarks/ltp/results/LTP_RUN_ON-2021_06_05-03h_18m_51s.log -C /lkp/benchmarks/ltp/output/LTP_RUN_ON-2021_06_05-03h_18m_51s.failed -T /lkp/benchmarks/ltp/output/LTP_RUN_ON-2021_06_05-03h_18m_51s.tconf
LOG File: /lkp/benchmarks/ltp/results/LTP_RUN_ON-2021_06_05-03h_18m_51s.log
FAILED COMMAND File: /lkp/benchmarks/ltp/output/LTP_RUN_ON-2021_06_05-03h_18m_51s.failed
TCONF COMMAND File: /lkp/benchmarks/ltp/output/LTP_RUN_ON-2021_06_05-03h_18m_51s.tconf
Running tests.......
<<<test_start>>>
tag=uevent01 stime=1622863131
cmdline="uevent01"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:1313: TINFO: Timeout per run is 0h 05m 00s
tst_device.c:89: TINFO: Found free device 0 '/dev/loop0'
uevent01.c:24: TINFO: Attaching device /dev/loop0
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: change@/devices/virtual/block/loop0
uevent.h:52: TINFO: ACTION=change
uevent.h:52: TINFO: DEVPATH=/devices/virtual/block/loop0
uevent.h:52: TINFO: SUBSYSTEM=block
uevent.h:52: TINFO: MAJOR=7
uevent.h:52: TINFO: MINOR=0
uevent.h:52: TINFO: DEVNAME=loop0
uevent.h:52: TINFO: DEVTYPE=disk
uevent.h:52: TINFO: SEQNUM=1928
uevent.h:140: TPASS: Got expected UEVENT
uevent01.c:26: TINFO: Detaching device /dev/loop0
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: change@/devices/virtual/block/loop0
uevent.h:52: TINFO: ACTION=change
uevent.h:52: TINFO: DEVPATH=/devices/virtual/block/loop0
uevent.h:52: TINFO: SUBSYSTEM=block
uevent.h:52: TINFO: SYNTH_UUID=0
uevent.h:52: TINFO: MAJOR=7
uevent.h:52: TINFO: MINOR=0
uevent.h:52: TINFO: DEVNAME=loop0
uevent.h:52: TINFO: DEVTYPE=disk
uevent.h:52: TINFO: SEQNUM=1929
uevent.h:140: TPASS: Got expected UEVENT
tst_device.c:213: TWARN: ioctl(/dev/loop0, LOOP_CLR_FD, 0) no ENXIO for too long

Summary:
passed 2
failed 0
broken 0
skipped 0
warnings 1
<<<execution_status>>>
initiation_status="ok"
duration=2 termination_type=exited termination_id=4 corefile=no
cutime=0 cstime=0
<<<test_end>>>
<<<test_start>>>
tag=uevent02 stime=1622863133
cmdline="uevent02"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:1313: TINFO: Timeout per run is 0h 05m 00s
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: add@/devices/virtual/misc/tun
uevent.h:52: TINFO: ACTION=add
uevent.h:52: TINFO: DEVPATH=/devices/virtual/misc/tun
uevent.h:52: TINFO: SUBSYSTEM=misc
uevent.h:52: TINFO: MAJOR=10
uevent.h:52: TINFO: MINOR=200
uevent.h:52: TINFO: DEVNAME=net/tun
uevent.h:52: TINFO: SEQNUM=1930
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: add@/module/tun
uevent.h:52: TINFO: ACTION=add
uevent.h:52: TINFO: DEVPATH=/module/tun
uevent.h:52: TINFO: SUBSYSTEM=module
uevent.h:52: TINFO: SEQNUM=1931
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: add@/devices/virtual/net/ltp-tun0
uevent.h:52: TINFO: ACTION=add
uevent.h:52: TINFO: DEVPATH=/devices/virtual/net/ltp-tun0
uevent.h:52: TINFO: SUBSYSTEM=net
uevent.h:52: TINFO: INTERFACE=ltp-tun0
uevent.h:52: TINFO: IFINDEX=3
uevent.h:52: TINFO: SEQNUM=1932
uevent.h:140: TPASS: Got expected UEVENT
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: add@/devices/virtual/net/ltp-tun0/queues/rx-0
uevent.h:52: TINFO: ACTION=add
uevent.h:52: TINFO: DEVPATH=/devices/virtual/net/ltp-tun0/queues/rx-0
uevent.h:52: TINFO: SUBSYSTEM=queues
uevent.h:52: TINFO: SEQNUM=1933
uevent.h:140: TPASS: Got expected UEVENT
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: add@/devices/virtual/net/ltp-tun0/queues/tx-0
uevent.h:52: TINFO: ACTION=add
uevent.h:52: TINFO: DEVPATH=/devices/virtual/net/ltp-tun0/queues/tx-0
uevent.h:52: TINFO: SUBSYSTEM=queues
uevent.h:52: TINFO: SEQNUM=1934
uevent.h:140: TPASS: Got expected UEVENT
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: remove@/devices/virtual/net/ltp-tun0/queues/rx-0
uevent.h:52: TINFO: ACTION=remove
uevent.h:52: TINFO: DEVPATH=/devices/virtual/net/ltp-tun0/queues/rx-0
uevent.h:52: TINFO: SUBSYSTEM=queues
uevent.h:52: TINFO: SEQNUM=1935
uevent.h:140: TPASS: Got expected UEVENT
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: remove@/devices/virtual/net/ltp-tun0/queues/tx-0
uevent.h:52: TINFO: ACTION=remove
uevent.h:52: TINFO: DEVPATH=/devices/virtual/net/ltp-tun0/queues/tx-0
uevent.h:52: TINFO: SUBSYSTEM=queues
uevent.h:52: TINFO: SEQNUM=1936
uevent.h:140: TPASS: Got expected UEVENT
uevent.h:49: TINFO: Got uevent:
uevent.h:52: TINFO: remove@/devices/virtual/net/ltp-tun0
uevent.h:52: TINFO: ACTION=remove
uevent.h:52: TINFO: DEVPATH=/devices/virtual/net/ltp-tun0
uevent.h:52: TINFO: SUBSYSTEM=net
uevent.h:52: TINFO: INTERFACE=ltp-tun0
uevent.h:52: TINFO: IFINDEX=3
uevent.h:52: TINFO: SEQNUM=1937
uevent.h:140: TPASS: Got expected UEVENT

Summary:
passed 6
failed 0
broken 0
skipped 0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=0
<<<test_end>>>
<<<test_start>>>
tag=uevent03 stime=1622863133
cmdline="uevent03"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:947: TCONF: uinput driver not available
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=32 corefile=no
cutime=0 cstime=0
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20210121-363-g9dcbf4e96

###############################################################

Done executing testcases.
LTP Version: 20210121-363-g9dcbf4e96
###############################################################




To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
bin/lkp run generated-yaml-file



---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation

Thanks,
Oliver Sang


Attachments:
(No filename) (11.71 kB)
config-5.13.0-rc3-00076-g1da9d8fdd7f2 (176.78 kB)
job-script (5.76 kB)
kmsg.xz (19.25 kB)
ltp (10.25 kB)
job.yaml (4.71 kB)
reproduce (66.00 B)
Download all attachments