[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <841ae1fb-bb5a-8b1e-6383-ca2e70b6e759@i-love.sakura.ne.jp>
Date: Fri, 7 Sep 2018 07:46:09 +0900
From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To: Christian König <christian.koenig@....com>,
Michal Hocko <mhocko@...nel.org>
Cc: kvm@...r.kernel.org,
Radim Krčmář <rkrcmar@...hat.com>,
Sudeep Dutt <sudeep.dutt@...el.com>,
dri-devel@...ts.freedesktop.org, linux-mm@...ck.org,
Andrea Arcangeli <aarcange@...hat.com>,
Dimitri Sivanich <sivanich@....com>,
Jason Gunthorpe <jgg@...pe.ca>, linux-rdma@...r.kernel.org,
amd-gfx@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
Doug Ledford <dledford@...hat.com>,
David Rientjes <rientjes@...gle.com>,
xen-devel@...ts.xenproject.org, intel-gfx@...ts.freedesktop.org,
Leon Romanovsky <leonro@...lanox.com>,
Jérôme Glisse <jglisse@...hat.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Mike Marciniszyn <mike.marciniszyn@...el.com>,
Dennis Dalessandro <dennis.dalessandro@...el.com>,
LKML <linux-kernel@...r.kernel.org>,
Ashutosh Dixit <ashutosh.dixit@...el.com>,
Alex Deucher <alexander.deucher@....com>,
Paolo Bonzini <pbonzini@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Felix Kuehling <felix.kuehling@....com>
Subject: Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers
On 2018/08/27 16:41, Christian König wrote:
> Am 26.08.2018 um 10:40 schrieb Tetsuo Handa:
>> I'm not following. Why don't we need to do like below (given that
>> nobody except amdgpu_mn_read_lock() holds ->read_lock) because e.g.
>> drm_sched_fence_create() from drm_sched_job_init() from amdgpu_cs_submit()
>> is doing GFP_KERNEL memory allocation with ->lock held for write?
>
> That's a bug which needs to be fixed separately.
>
> Allocating memory with GFP_KERNEL while holding a lock which is also taken in the reclaim code path is illegal not matter what you do.
>
> Patches to fix this are already on the appropriate mailing list and will be pushed upstream today.
>
> Regards,
> Christian.
Commit 4a2de54dc1d7668f ("drm/amdgpu: fix holding mn_lock while allocating memory")
seems to be calling amdgpu_mn_unlock() without amdgpu_mn_lock() when
drm_sched_job_init() failed...
Michal, you are asking me to fix all bugs (including out of tree code) and prevent
future bugs just because you want to avoid using timeout in order to avoid OOM lockup
( https://marc.info/?i=55a3fb37-3246-73d7-0f45-5835a3f4831c@i-love.sakura.ne.jp ).
That is a too much request which is impossible for even you. More you count on
the OOM reaper, we exponentially complicates dependency and more likely to stumble
over unreviewed/untested code...
Powered by blists - more mailing lists