Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1413670

Re: [linux-next: Tree for Jun 1] __khugepaged_exit rwsem_down_write_failed lockup

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [linux-next: Tree for Jun 1] __khugepaged_exit rwsem_down_write_failed lockup
Date 2016-06-04 10:00 +0200
Message-ID <rGeEW-64j-3@gated-at.bofh.it> (permalink)
References (5 earlier) <rFU3x-1wB-49@gated-at.bofh.it> <rFUdc-1OZ-33@gated-at.bofh.it> <rFXup-3Iu-11@gated-at.bofh.it> <rFXE5-3Ng-15@gated-at.bofh.it> <rFXE5-3Ng-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On (06/03/16 15:49), Michal Hocko wrote:
> __khugepaged_exit is called during the final __mmput and it employs a
> complex synchronization dances to make sure it doesn't race with the
> khugepaged which might be scanning this mm at the same time. This is
> all caused by the fact that khugepaged doesn't pin mm_users. Things
> would simplify considerably if we simply check the mm at
> khugepaged_scan_mm_slot and if mm_users was already 0 then we know it
> is dead and we can unhash the mm_slot and move on to another one. This
> will also guarantee that __khugepaged_exit cannot race with khugepaged
> and so we can free up the slot if it is still hashed.
> 
> Signed-off-by: Michal Hocko <mhocko@suse.com>

with this patch and
http://ozlabs.org/~akpm/mmotm/broken-out/mm-thp-make-swapin-readahead-under-down_read-of-mmap_sem-fix-2.patch

I saw no problems during my tests (well, may be didn't test hard
enough).

	-ss

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

linux-next: Tree for Jun 1 Stephen Rothwell <sfr@canb.auug.org.au> - 2016-06-01 05:20 +0200
  [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-02 04:00 +0200
    Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-02 11:30 +0200
      Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-06-02 14:10 +0200
        Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-02 14:30 +0200
          Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Andrea Arcangeli <aarcange@redhat.com> - 2016-06-03 16:00 +0200
            Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-03 16:50 +0200
              Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Andrea Arcangeli <aarcange@redhat.com> - 2016-06-03 17:20 +0200
                Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-07 09:40 +0200
                Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Vlastimil Babka <vbabka@suse.cz> - 2016-06-08 10:20 +0200
      Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-03 09:20 +0200
        Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-03 09:30 +0200
          Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-03 10:50 +0200
            Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-03 12:00 +0200
              Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-03 12:10 +0200
                Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-06-03 15:40 +0200
                Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-03 15:50 +0200
                Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-03 15:50 +0200
                Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-04 10:00 +0200
                Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Michal Hocko <mhocko@kernel.org> - 2016-06-06 10:40 +0200
    Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Vlastimil Babka <vbabka@suse.cz> - 2016-06-02 15:30 +0200
      Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-02 21:00 +0200
        Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-03 03:10 +0200
          Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-03 03:30 +0200
            Re: [linux-next: Tree for Jun 1] __khugepaged_exit  rwsem_down_write_failed lockup Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-03 06:20 +0200
      [PATCH] mm, thp: fix locking inconsistency in collapse_huge_page Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-03 14:30 +0200
        Re: [PATCH] mm, thp: fix locking inconsistency in collapse_huge_page Vlastimil Babka <vbabka@suse.cz> - 2016-06-06 15:10 +0200
          Re: [PATCH] mm, thp: fix locking inconsistency in collapse_huge_page Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-09 06:00 +0200

csiph-web