Re: [PATCH] iomap: Set all uptodate bits for an Uptodate page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 25, 2020 at 3:24 PM Sedat Dilek <sedat.dilek@xxxxxxxxx> wrote:
>
> On Fri, Sep 25, 2020 at 1:57 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> >
> > On Thu, Sep 24, 2020 at 10:04:40PM +0200, Sedat Dilek wrote:
> > > On Thu, Sep 24, 2020 at 10:02 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> > > >
> > > > On Thu, Sep 24, 2020 at 09:54:36PM +0200, Sedat Dilek wrote:
> > > > > You are named in "mm: fix misplaced unlock_page in do_wp_page()".
> > > > > Is this here a different issue?
> > > >
> > > > Yes, completely different.  That bug is one Linus introduced in this
> > > > cycle; the bug that this patch fixes was introduced a couple of years
> > > > ago, and we only noticed now because I added an assertion to -next.
> > > > Maybe I should add the assertion for 5.9 too.
> > >
> > > Can you point me to this "assertion"?
> > > Thanks.
> >
> > Here's the version against 5.8
> >
> > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> > index 810f7dae11d9..b421e4efc4bd 100644
> > --- a/fs/iomap/buffered-io.c
> > +++ b/fs/iomap/buffered-io.c
> > @@ -70,11 +70,15 @@ static void
> >  iomap_page_release(struct page *page)
> >  {
> >         struct iomap_page *iop = detach_page_private(page);
> > +       unsigned int nr_blocks = PAGE_SIZE / i_blocksize(page->mapping->host);
> >
> >         if (!iop)
> >                 return;
> >         WARN_ON_ONCE(atomic_read(&iop->read_count));
> >         WARN_ON_ONCE(atomic_read(&iop->write_count));
> > +       WARN_ON_ONCE(bitmap_full(iop->uptodate, nr_blocks) !=
> > +                       PageUptodate(page));
> > +
> >         kfree(iop);
> >  }
> >
>
> I have applied your diff on top of Linux v5.9-rc6+ together with
> "iomap: Set all uptodate bits for an Uptodate page".
>
> Run LTP tests:
>
> #1: syscalls (all)
> #2: syscalls/preadv203
> #3: syscalls/dirtyc0w
>
> With #1 I see some failures with madvise0x tests.
>
> I have attached the excerpt of my kernel-log and my kernel-config.
>

I have run syscalls/madvise01..syscalls/madvise10, see attached
(reduced) dmesg-log.

- Sedat -
[Fri Sep 25 15:29:32 2020] LTP: starting madvise01
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x17d70a at process virtual address 0x7f6f1d5ed000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x17d70a: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x1bf021 at process virtual address 0x7f6f1d5ee000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x1bf021: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x1f1bff at process virtual address 0x7f6f1d5ef000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x1f1bff: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x1ecd4e at process virtual address 0x7f6f1d5f0000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x1ecd4e: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x2090c2 at process virtual address 0x7f6f1d5f1000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x2090c2: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x115260 at process virtual address 0x7f6f1d5f2000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x115260: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x182902 at process virtual address 0x7f6f1d5f3000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x182902: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x125c05 at process virtual address 0x7f6f1d5f4000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x125c05: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x127d91 at process virtual address 0x7f6f1d5f5000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x127d91: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] Injecting memory failure for pfn 0x187df3 at process virtual address 0x7f6f1d5f6000
[Fri Sep 25 15:29:32 2020] Memory failure: 0x187df3: recovery action for clean LRU page: Recovered
[Fri Sep 25 15:29:32 2020] LTP: starting madvise02
[Fri Sep 25 15:29:33 2020] LTP: starting madvise05
[Fri Sep 25 15:29:33 2020] LTP: starting madvise06
[Fri Sep 25 15:29:34 2020] madvise06 (539269): drop_caches: 3
[Fri Sep 25 15:29:46 2020] LTP: starting madvise07
[Fri Sep 25 15:29:46 2020] Injecting memory failure for pfn 0x1f7993 at process virtual address 0x7fbe67bfb000
[Fri Sep 25 15:29:46 2020] Memory failure: 0x1f7993: recovery action for dirty LRU page: Recovered
[Fri Sep 25 15:29:46 2020] MCE: Killing madvise07:539405 due to hardware memory corruption fault at 7fbe67bfb000
[Fri Sep 25 15:29:46 2020] LTP: starting madvise08
[Fri Sep 25 15:29:46 2020] LTP: starting madvise09
[Fri Sep 25 15:29:47 2020] madvise09 invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
[Fri Sep 25 15:29:47 2020] CPU: 1 PID: 539680 Comm: madvise09 Tainted: G            E     5.9.0-rc6-5-amd64-clang-cfi #5~bullseye+dileks1
[Fri Sep 25 15:29:47 2020] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013
[Fri Sep 25 15:29:47 2020] Call Trace:
[Fri Sep 25 15:29:47 2020]  dump_stack+0x64/0x9b
[Fri Sep 25 15:29:47 2020]  dump_header+0x50/0x230
[Fri Sep 25 15:29:47 2020]  oom_kill_process+0xa1/0x170
[Fri Sep 25 15:29:47 2020]  out_of_memory+0x265/0x330
[Fri Sep 25 15:29:47 2020]  mem_cgroup_oom+0x313/0x360
[Fri Sep 25 15:29:47 2020]  try_charge+0x51f/0x730
[Fri Sep 25 15:29:47 2020]  mem_cgroup_charge+0x100/0x300
[Fri Sep 25 15:29:47 2020]  do_anonymous_page+0x229/0x690
[Fri Sep 25 15:29:47 2020]  ? __schedule+0x41a/0x7c0
[Fri Sep 25 15:29:47 2020]  ? dma_get_required_mask.cfi_jt+0x10/0x10
[Fri Sep 25 15:29:47 2020]  handle_mm_fault+0x8b0/0xcc0
[Fri Sep 25 15:29:47 2020]  do_user_addr_fault+0x201/0x3a0
[Fri Sep 25 15:29:47 2020]  ? asm_exc_page_fault+0x8/0x30
[Fri Sep 25 15:29:47 2020]  exc_page_fault+0x7a/0x270
[Fri Sep 25 15:29:47 2020]  ? asm_exc_page_fault+0x8/0x30
[Fri Sep 25 15:29:47 2020]  asm_exc_page_fault+0x1e/0x30
[Fri Sep 25 15:29:47 2020] RIP: 0033:0x55b8f6d6655b
[Fri Sep 25 15:29:47 2020] Code: 48 c1 ea 02 48 89 d0 48 f7 e5 48 89 d0 48 83 e2 fc 48 c1 e8 02 48 01 c2 48 8d 04 92 4c 89 f2 49 83 c6 01 48 c1 e0 02 48 29 c2 <41> 88 17 49 01 df e8 3a f5 ff ff 49 81 fe f4 01 00 00 75 b9 44 8b
[Fri Sep 25 15:29:47 2020] RSP: 002b:00007ffed18e2ba0 EFLAGS: 00010202
[Fri Sep 25 15:29:47 2020] RAX: 0000000000000000 RBX: 0000000000001000 RCX: 0000000000000000
[Fri Sep 25 15:29:47 2020] RDX: 000000000000001f RSI: 0000000000000000 RDI: 0000000000000001
[Fri Sep 25 15:29:47 2020] RBP: 28f5c28f5c28f5c3 R08: 00000000ffffffff R09: 0000000000000000
[Fri Sep 25 15:29:47 2020] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffed18e2bd0
[Fri Sep 25 15:29:47 2020] R13: 00000000001f4000 R14: 0000000000000020 R15: 00007f2bed355000
[Fri Sep 25 15:29:47 2020] memory: usage 8192kB, limit 8192kB, failcnt 485
[Fri Sep 25 15:29:47 2020] memory+swap: usage 16316kB, limit 16384kB, failcnt 15
[Fri Sep 25 15:29:47 2020] kmem: usage 124kB, limit 9007199254740988kB, failcnt 0
[Fri Sep 25 15:29:47 2020] Memory cgroup stats for /ltp_madvise09_539679:
[Fri Sep 25 15:29:47 2020] anon 8110080
[Fri Sep 25 15:29:47 2020] Tasks state (memory values in pages):
[Fri Sep 25 15:29:47 2020] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
[Fri Sep 25 15:29:47 2020] [ 539679]     0 539679      746      310    45056        8             0 madvise09
[Fri Sep 25 15:29:47 2020] [ 539680]     0 539680     5246     2163    81920     2039             0 madvise09
[Fri Sep 25 15:29:47 2020] oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/ltp_madvise09_539679,task_memcg=/ltp_madvise09_539679,task=madvise09,pid=539680,uid=0
[Fri Sep 25 15:29:47 2020] Memory cgroup out of memory: Killed process 539680 (madvise09) total-vm:20984kB, anon-rss:8024kB, file-rss:628kB, shmem-rss:0kB, UID:0 pgtables:80kB oom_score_adj:0
[Fri Sep 25 15:29:47 2020] oom_reaper: reaped process 539680 (madvise09), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[Fri Sep 25 15:29:47 2020] LTP: starting madvise10

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux