[PATCH] drm: use kvmalloc_array for drm_malloc*

2017-05-17 Thread Michal Hocko
From: Michal Hocko drm_malloc* has grown their own kmalloc with vmalloc fallback implementations. MM has grown kvmalloc* helpers in the meantime. Let's use those because it a) reduces the code and b) MM has a better idea how to implement fallbacks (e.g. do not vmalloc before kmalloc is

[PATCH 2/2] drm: drop drm_[cm]alloc* helpers

2017-05-17 Thread Michal Hocko
From: Michal Hocko Now that drm_[cm]alloc* helpers are simple one line wrappers around kvmalloc_array and drm_free_large is just kvfree alias we can drop them and replace by their native forms. This shouldn't introduce any functional change. Suggested-by: Daniel Vetter Signed-off-by: M

Re: [PATCH] drm: use kvmalloc_array for drm_malloc*

2017-05-17 Thread Michal Hocko
On Wed 17-05-17 08:59:44, Chris Wilson wrote: > On Wed, May 17, 2017 at 09:44:53AM +0200, Michal Hocko wrote: > > On Tue 16-05-17 12:09:08, Chris Wilson wrote: > > > On Tue, May 16, 2017 at 12:53:52PM +0200, Michal Hocko wrote: > > > > On Tue 16-05-17 10:31:19, Chris

[PATCH 1/2] drm: replace drm_[cm]alloc* by kvmalloc alternatives

2017-05-17 Thread Michal Hocko
From: Michal Hocko drm_[cm]alloc* has grown their own kvmalloc with vmalloc fallback implementations. MM has grown kvmalloc* helpers in the meantime. Let's use those because it a) reduces the code and b) MM has a better idea how to implement fallbacks (e.g. do not vmalloc before kmalloc is

Re: [PATCH] drm: use kvmalloc_array for drm_malloc*

2017-05-17 Thread Michal Hocko
On Tue 16-05-17 11:22:30, Daniel Vetter wrote: > On Tue, May 16, 2017 at 11:06:06AM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > drm_malloc* has grown their own kmalloc with vmalloc fallback > > implementations. MM has grown kvmalloc* helpers in the me

Re: [PATCH] drm: use kvmalloc_array for drm_malloc*

2017-05-17 Thread Michal Hocko
On Tue 16-05-17 10:31:19, Chris Wilson wrote: > On Tue, May 16, 2017 at 11:06:06AM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > drm_malloc* has grown their own kmalloc with vmalloc fallback > > implementations. MM has grown kvmalloc* helpers in the me

Re: [PATCH] drm: use kvmalloc_array for drm_malloc*

2017-05-17 Thread Michal Hocko
On Tue 16-05-17 12:09:08, Chris Wilson wrote: > On Tue, May 16, 2017 at 12:53:52PM +0200, Michal Hocko wrote: > > On Tue 16-05-17 10:31:19, Chris Wilson wrote: > > > On Tue, May 16, 2017 at 11:06:06AM +0200, Michal Hocko wrote: > > > > From: Michal Hocko > >

[PATCH 1/2] mm: add locked parameter to get_user_pages_remote()

2016-10-27 Thread Michal Hocko
flexibility in the > use of get_user_pages_remote(). I would also add that this shouldn't introduce any functional change. > Signed-off-by: Lorenzo Stoakes Acked-by: Michal Hocko > --- > drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +- > drivers/gpu/drm/i915/i915_gem_

[PATCH 2/2] mm: unexport __get_user_pages_unlocked()

2016-10-27 Thread Michal Hocko
cing it is therefore not an issue. Looks good to me. > Signed-off-by: Lorenzo Stoakes Acked-by: Michal Hocko > --- > include/linux/mm.h | 3 --- > mm/gup.c | 8 > mm/nommu.c | 7 +++ > mm/process_vm_access.c | 12 &g

[PATCH 1/2] mm: add locked parameter to get_user_pages_remote()

2016-10-27 Thread Michal Hocko
On Thu 27-10-16 12:55:27, Michal Hocko wrote: > On Thu 27-10-16 10:51:40, Lorenzo Stoakes wrote: > > This patch adds a int *locked parameter to get_user_pages_remote() to allow > > VM_FAULT_RETRY faulting behaviour similar to get_user_pages_[un]locked(). > > > > Takin

Re: [patch 00/13] preempt: Make preempt count unconditional

2020-09-30 Thread Michal Hocko
On Tue 29-09-20 11:00:03, Daniel Vetter wrote: > On Tue, Sep 29, 2020 at 10:19:38AM +0200, Michal Hocko wrote: > > On Wed 16-09-20 23:43:02, Daniel Vetter wrote: > > > I can > > > then figure out whether it's better to risk not spotting issues with > > >

Re: [patch 00/13] preempt: Make preempt count unconditional

2020-09-30 Thread Michal Hocko
o carefuly consider failure. This is not a random allocation mode. -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: next-20200515: Xorg killed due to "OOM"

2020-05-28 Thread Michal Hocko
ler has been invoked is that the page fault handler has returned VM_FAULT_OOM. So this is not a result of the page allocator struggling to allocate a memory. It would be interesting to check which code path has returned this. -- Michal Hocko SUSE Labs _

Re: next-20200515: Xorg killed due to "OOM"

2020-05-28 Thread Michal Hocko
On Thu 28-05-20 14:03:54, Pavel Machek wrote: > On Thu 2020-05-28 11:05:17, Michal Hocko wrote: > > On Tue 26-05-20 11:10:54, Pavel Machek wrote: > > [...] > > > [38617.276517] oom_reaper: reaped process 31769 (chromium), now > > > anon-rss:0kB, file-rss:0kB, shm

Re: next-20200515: Xorg killed due to "OOM"

2020-06-01 Thread Michal Hocko
On Sun 31-05-20 14:16:01, Pavel Machek wrote: > On Thu 2020-05-28 14:07:50, Michal Hocko wrote: > > On Thu 28-05-20 14:03:54, Pavel Machek wrote: > > > On Thu 2020-05-28 11:05:17, Michal Hocko wrote: > > > > On Tue 26-05-20 11:10:54, Pavel Machek wrote: > &g

drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy

2016-12-01 Thread Michal Hocko
Forgot to CC Joonsoo. The email thread starts more or less here http://lkml.kernel.org/r/20161130092239.GD18437 at dhcp22.suse.cz On Thu 01-12-16 08:15:07, Michal Hocko wrote: > On Wed 30-11-16 20:19:03, Robin H. Johnson wrote: > [...] > > alloc_contig_range: [83f2a3, 83f2a4) PFNs b

drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy

2016-12-01 Thread Michal Hocko
On Wed 30-11-16 20:19:03, Robin H. Johnson wrote: [...] > alloc_contig_range: [83f2a3, 83f2a4) PFNs busy Huh, do I get it right that the request was for a _single_ page? Why do we need CMA for that? -- Michal Hocko SUSE Labs

drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy

2016-12-01 Thread Michal Hocko
Let's also CC Marek On Thu 01-12-16 08:43:40, Vlastimil Babka wrote: > On 12/01/2016 08:21 AM, Michal Hocko wrote: > > Forgot to CC Joonsoo. The email thread starts more or less here > > http://lkml.kernel.org/r/20161130092239.GD18437 at dhcp22.suse.cz > > > >

drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy

2016-12-01 Thread Michal Hocko
On Thu 01-12-16 17:03:52, Michal Nazarewicz wrote: > On Thu, Dec 01 2016, Michal Hocko wrote: > > Let's also CC Marek > > > > On Thu 01-12-16 08:43:40, Vlastimil Babka wrote: > >> On 12/01/2016 08:21 AM, Michal Hocko wrote: > >> > Forgot to CC Joo

[PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-20 Thread Michal Hocko
g justification. If the discoverability is really needed then fair enough but I haven't seen any justification for that yet. -- Michal Hocko SUSE Labs

[PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-21 Thread Michal Hocko
On Thu 20-08-15 13:03:09, Eric B Munson wrote: > On Thu, 20 Aug 2015, Michal Hocko wrote: > > > On Wed 19-08-15 17:33:45, Eric B Munson wrote: > > [...] > > > The group which asked for this feature here > > > wants the ability to distinguish between LOCK

[PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-25 Thread Michal Hocko
On Tue 25-08-15 15:55:46, Vlastimil Babka wrote: > On 08/25/2015 03:41 PM, Michal Hocko wrote: [...] > >So what we have as a result is that partially populated ranges are > >preserved and fully populated ones work in the best effort mode the same > >way as they are now. >

[PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-25 Thread Michal Hocko
On Tue 25-08-15 10:29:02, Eric B Munson wrote: > On Tue, 25 Aug 2015, Michal Hocko wrote: [...] > > Considering the current behavior I do not thing it would be terrible > > thing to do what Konstantin was suggesting and populate only the full > > ranges in a best effort mode

[PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-26 Thread Michal Hocko
ll paths where gup is called unconditionally, I haven't checked that. -- Michal Hocko SUSE Labs

[PATCH v7 3/6] mm: Introduce VM_LOCKONFAULT

2015-08-25 Thread Michal Hocko
re preserved and fully populated ones work in the best effort mode the same way as they are now. Does that sound at least remotely reasonably? -- Michal Hocko SUSE Labs

Re: [PATCH] mm: convert totalram_pages, totalhigh_pages and managed_pages to atomic.

2018-10-23 Thread Michal Hocko
s hard to review manually. -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v8 1/7] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL

2018-11-22 Thread Michal Hocko
buse like we have in other areas in the past. And out-of-tree modules? Who cares. Those are on their own completely and have their ways to go around. > Cc: Michal Hocko > Cc: "Jérôme Glisse" > Reviewed-by: Christoph Hellwig > Signed-off-by: Dan Williams That being said Acked

Re: [PATCH v8 1/7] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL

2018-11-23 Thread Michal Hocko
On Thu 22-11-18 17:38:58, Christoph Hellwig wrote: > On Thu, Nov 22, 2018 at 02:30:13PM +0100, Michal Hocko wrote: > > Whoever needs a wrapper around arch_add_memory can do so because this > > symbol has no restriction for the usage. > > arch_add_memory is not exported, and

Re: [PATCH 2/3] mm, notifier: Catch sleeping/blocking for !blockable

2018-11-23 Thread Michal Hocko
e > might_sleep() callsites trigger, and it's a bit ugly in the code flow. > But it gets the job done. Yeah, it is quite ugly. Especially because it makes DEBUG config bahavior much different. So is this really worth it? Has this already discovered any existing bug? > Cc: Andrew Morto

Re: [Intel-gfx] [PATCH 1/3] mm: Check if mmu notifier callbacks are allowed to fail

2018-11-23 Thread Michal Hocko
ng to free any kind of memory. And where the process is > gone already, so semantics of what exactly happens don't matter that much > anymore. Yes this was indeed the case. There is still the exit path which would do the rest of the work so we are not leaving anything behind. --

Re: [PATCH 1/3] mm: Check if mmu notifier callbacks are allowed to fail

2018-11-23 Thread Michal Hocko
pr_info? Is really backtrace that interesting? > Cc: Andrew Morton > Cc: Michal Hocko > Cc: "Christian König" > Cc: David Rientjes > Cc: Daniel Vetter > Cc: "Jérôme Glisse" > Cc: linux...@kvack.org > Cc: Paolo Bonzini > Signed-off-by: Dan

Re: [PATCH 1/3] mm: Check if mmu notifier callbacks are allowed to fail

2018-11-23 Thread Michal Hocko
On Fri 23-11-18 13:30:57, Daniel Vetter wrote: > On Fri, Nov 23, 2018 at 12:15:57PM +0100, Michal Hocko wrote: > > On Thu 22-11-18 17:51:04, Daniel Vetter wrote: > > > Just a bit of paranoia, since if we start pushing this deep into > > > callchains it's hard

Re: [PATCH 2/3] mm, notifier: Catch sleeping/blocking for !blockable

2018-11-23 Thread Michal Hocko
On Fri 23-11-18 13:38:38, Daniel Vetter wrote: > On Fri, Nov 23, 2018 at 12:12:37PM +0100, Michal Hocko wrote: > > On Thu 22-11-18 17:51:05, Daniel Vetter wrote: > > > We need to make sure implementations don't cheat and don't have a > > > possible schedul

Re: [PATCH 1/3] mm: Check if mmu notifier callbacks are allowed to fail

2018-11-23 Thread Michal Hocko
On Fri 23-11-18 14:15:11, Daniel Vetter wrote: > On Fri, Nov 23, 2018 at 1:43 PM Michal Hocko wrote: > > On Fri 23-11-18 13:30:57, Daniel Vetter wrote: > > > On Fri, Nov 23, 2018 at 12:15:57PM +0100, Michal Hocko wrote: > > > > On Thu 22-11-18 17:51:04, Daniel Vett

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
int amdgpu_mn_read_lock(struct amdgpu_mn *amn, bool blockable) */ static void amdgpu_mn_read_unlock(struct amdgpu_mn *amn) { - if (atomic_dec_return(&amn->recursion) == 0) - up_read_non_owner(&amn->lock); + up_read(&amn->lock); } /** -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
pagetables(mirror, > action, > > That is, this API seems to be currently used by only out-of-tree users. Since > we can't check that nobody has memory allocation dependency, I think that > hmm_invalidate_range_start() should return -EAGAIN if blockable == false for > now

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
On Fri 24-08-18 13:43:16, Christian König wrote: > Am 24.08.2018 um 13:32 schrieb Michal Hocko: > > On Fri 24-08-18 19:54:19, Tetsuo Handa wrote: > > > Two more worries for this patch. > > > > > > > > > > > > > --- a/drivers/gpu/drm

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
On Fri 24-08-18 13:57:52, Christian König wrote: > Am 24.08.2018 um 13:52 schrieb Michal Hocko: > > On Fri 24-08-18 13:43:16, Christian König wrote: [...] > > > That won't work like this there might be multiple > > > invalidate_range_start()/invalidate_ra

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
On Fri 24-08-18 14:18:44, Christian König wrote: > Am 24.08.2018 um 14:03 schrieb Michal Hocko: > > On Fri 24-08-18 13:57:52, Christian König wrote: > > > Am 24.08.2018 um 13:52 schrieb Michal Hocko: > > > > On Fri 24-08-18 13:43:16, Christian König wrote: > >

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
On Fri 24-08-18 14:52:26, Christian König wrote: > Am 24.08.2018 um 14:33 schrieb Michal Hocko: [...] > > Thiking about it some more, I can imagine that a notifier callback which > > performs an allocation might trigger a memory reclaim and that in turn > > might trigger a n

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
On Fri 24-08-18 15:10:08, Christian König wrote: > Am 24.08.2018 um 15:01 schrieb Michal Hocko: > > On Fri 24-08-18 14:52:26, Christian König wrote: > > > Am 24.08.2018 um 14:33 schrieb Michal Hocko: > > [...] > > > > Thiking about it some more, I can im

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
On Fri 24-08-18 22:02:23, Tetsuo Handa wrote: > On 2018/08/24 20:36, Michal Hocko wrote: > >> That is, this API seems to be currently used by only out-of-tree users. > >> Since > >> we can't check that nobody has memory allocation dependency, I think that >

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
On Fri 24-08-18 15:28:33, Christian König wrote: > Am 24.08.2018 um 15:24 schrieb Michal Hocko: > > On Fri 24-08-18 15:10:08, Christian König wrote: > > > Am 24.08.2018 um 15:01 schrieb Michal Hocko: > > > > On Fri 24-08-18 14:52:26, Christian König wrote: > >

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
On Fri 24-08-18 15:44:03, Christian König wrote: > Am 24.08.2018 um 15:40 schrieb Michal Hocko: > > On Fri 24-08-18 15:28:33, Christian König wrote: > > > Am 24.08.2018 um 15:24 schrieb Michal Hocko: > > > > On Fri 24-08-18 15:10:08, Christian König wrote: > >

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
On Fri 24-08-18 23:52:25, Tetsuo Handa wrote: > On 2018/08/24 22:32, Michal Hocko wrote: > > On Fri 24-08-18 22:02:23, Tetsuo Handa wrote: > >> I worry that (currently > >> out-of-tree) users of this API are involving work / recursion. > > > > I do not giv

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-24 Thread Michal Hocko
about? From f7ac75277d526dccd011f343818dc6af627af2af Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Fri, 24 Aug 2018 15:32:24 +0200 Subject: [PATCH] mm, mmu_notifier: be explicit about range invalition non-blocking mode If invalidate_range_start is called for !blocking mode then all callbacks have to guarantee

[RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-06-22 Thread Michal Hocko
From: Michal Hocko There are several blockable mmu notifiers which might sleep in mmu_notifier_invalidate_range_start and that is a problem for the oom_reaper because it needs to guarantee a forward progress so it cannot depend on any sleepable locks. Currently we simply back off and mark an oom

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-06-22 Thread Michal Hocko
> > @@ -244,7 +258,8 @@ static void amdgpu_mn_invalidate_range_start_hsa(struct > > mmu_notifier *mn, > > /* notification is exclusive, but interval is inclusive */ > > end -= 1; > > - amdgpu_mn_read_lock(rmn); > > + if (amdgpu_mn_read_lock(rmn, blockable)) > > + return -EAGAIN; > > it = interval_tree_iter_first(&rmn->objects, start, end); > > while (it) { > > @@ -262,6 +277,8 @@ static void amdgpu_mn_invalidate_range_start_hsa(struct > > mmu_notifier *mn, > > amdgpu_amdkfd_evict_userptr(mem, mm); > > } > > } > > + > > + return 0; > > } > > /** -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [Intel-gfx] [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-06-22 Thread Michal Hocko
On Fri 22-06-18 16:36:49, Chris Wilson wrote: > Quoting Michal Hocko (2018-06-22 16:02:42) > > Hi, > > this is an RFC and not tested at all. I am not very familiar with the > > mmu notifiers semantics very much so this is a crude attempt to achieve > > what I need basica

Re: [Intel-gfx] [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-06-22 Thread Michal Hocko
[Hmm, the cc list got mangled somehow - you have just made many people to work for suse ;) and to kvack.org in the preious one - fixed up hopefully] On Fri 22-06-18 17:07:21, Chris Wilson wrote: > Quoting Michal Hocko (2018-06-22 16:57:16) > > On Fri 22-06-18 16:36:49, Chris Wil

Re: [Intel-gfx] [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-06-22 Thread Michal Hocko
[Resnding with the CC list fixed] On Fri 22-06-18 18:40:26, Michal Hocko wrote: > On Fri 22-06-18 12:18:46, Jerome Glisse wrote: > > On Fri, Jun 22, 2018 at 05:57:16PM +0200, Michal Hocko wrote: > > > On Fri 22-06-18 16:36:49, Chris Wilson wrote: > > > > Quoting Mic

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-06-25 Thread Michal Hocko
On Fri 22-06-18 16:09:06, Felix Kuehling wrote: > On 2018-06-22 11:24 AM, Michal Hocko wrote: > > On Fri 22-06-18 17:13:02, Christian König wrote: > >> Hi Michal, > >> > >> [Adding Felix as well] > >> > >> Well first of all you have a misconcep

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-06-25 Thread Michal Hocko
On Mon 25-06-18 10:01:03, Michal Hocko wrote: > On Fri 22-06-18 16:09:06, Felix Kuehling wrote: > > On 2018-06-22 11:24 AM, Michal Hocko wrote: > > > On Fri 22-06-18 17:13:02, Christian König wrote: > > >> Hi Michal, > > >> > > >> [Adding Fel

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-06-27 Thread Michal Hocko
7 00:00:00 2001 From: Michal Hocko Date: Wed, 20 Jun 2018 15:03:20 +0200 Subject: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are several blockable mmu notifiers which migh

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-02 Thread Michal Hocko
On Mon 02-07-18 11:14:58, Christian König wrote: > Am 27.06.2018 um 09:44 schrieb Michal Hocko: > > This is the v2 of RFC based on the feedback I've received so far. The > > code even compiles as a bonus ;) I haven't runtime tested it yet, mostly > > because I

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-02 Thread Michal Hocko
On Mon 02-07-18 14:13:42, Christian König wrote: > Am 02.07.2018 um 13:54 schrieb Michal Hocko: > > On Mon 02-07-18 11:14:58, Christian König wrote: > > > Am 27.06.2018 um 09:44 schrieb Michal Hocko: > > > > This is the v2 of RFC based on the feedback I've rec

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-02 Thread Michal Hocko
On Mon 02-07-18 14:24:29, Christian König wrote: > Am 02.07.2018 um 14:20 schrieb Michal Hocko: > > On Mon 02-07-18 14:13:42, Christian König wrote: > > > Am 02.07.2018 um 13:54 schrieb Michal Hocko: > > > > On Mon 02-07-18 11:14:58, Christian König wrote: > >

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-02 Thread Michal Hocko
de would simply back of without releasing any memory. The patch should help to reclaim some memory. > But do you know a way to let the OOM killer kill a specific process? Yes, you can set its oom_score_adj to 1000 which means always select that task.

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-09 Thread Michal Hocko
On Wed 27-06-18 09:44:21, Michal Hocko wrote: > This is the v2 of RFC based on the feedback I've received so far. The > code even compiles as a bonus ;) I haven't runtime tested it yet, mostly > because I have no idea how. > > Any further feedback is highly apprecia

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-10 Thread Michal Hocko
On Tue 10-07-18 16:40:40, Leon Romanovsky wrote: > On Mon, Jul 09, 2018 at 02:29:08PM +0200, Michal Hocko wrote: > > On Wed 27-06-18 09:44:21, Michal Hocko wrote: > > > This is the v2 of RFC based on the feedback I've received so far. The > > > code even compiles

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-11 Thread Michal Hocko
On Tue 10-07-18 19:20:20, Leon Romanovsky wrote: > On Tue, Jul 10, 2018 at 04:14:10PM +0200, Michal Hocko wrote: > > On Tue 10-07-18 16:40:40, Leon Romanovsky wrote: > > > On Mon, Jul 09, 2018 at 02:29:08PM +0200, Michal Hocko wrote: > > > > On Wed 27-06-1

Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-11 Thread Michal Hocko
On Wed 11-07-18 13:14:47, Leon Romanovsky wrote: > On Wed, Jul 11, 2018 at 11:03:53AM +0200, Michal Hocko wrote: > > On Tue 10-07-18 19:20:20, Leon Romanovsky wrote: > > > On Tue, Jul 10, 2018 at 04:14:10PM +0200, Michal Hocko wrote: > > > > On Tue 10-07-18 1

Re: [PATCH 1/4] mm: Check if mmu notifier callbacks are allowed to fail

2018-12-10 Thread Michal Hocko
ir enough. If this is going to help with testing then I do not have any objections of course. > v2: Drop the full WARN_ON backtrace in favour of just a pr_warn for > the problematic case (Michal Hocko). Thanks! > Cc: Andrew Morton > Cc: Michal Hocko > Cc: "Christian König"

Re: [PATCH 2/4] kernel.h: Add non_block_start/end()

2018-12-10 Thread Michal Hocko
,enable}, and that really has a different semantic, I think this makes some sense. The cotext is preemptible but we do not want notifier to sleep on any locks, WQ etc. > Suggested by Michal Hocko. > > Cc: Andrew Morton > Cc: Michal Hocko > Cc: David Rientjes > Cc: "Chris

Re: [PATCH 2/4] kernel.h: Add non_block_start/end()

2018-12-10 Thread Michal Hocko
On Mon 10-12-18 15:47:11, Peter Zijlstra wrote: > On Mon, Dec 10, 2018 at 03:13:37PM +0100, Michal Hocko wrote: > > I do not see any scheduler guys Cced and it would be really great to get > > their opinion here. > > > > On Mon 10-12-18 11:36:39, Daniel Vetter wrote:

Re: [PATCH 2/4] kernel.h: Add non_block_start/end()

2018-12-10 Thread Michal Hocko
On Mon 10-12-18 16:22:53, Peter Zijlstra wrote: > On Mon, Dec 10, 2018 at 04:01:59PM +0100, Michal Hocko wrote: > > On Mon 10-12-18 15:47:11, Peter Zijlstra wrote: > > > On Mon, Dec 10, 2018 at 03:13:37PM +0100, Michal Hocko wrote: > > > > I do not see any sched

[PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-16 Thread Michal Hocko
From: Michal Hocko There are several blockable mmu notifiers which might sleep in mmu_notifier_invalidate_range_start and that is a problem for the oom_reaper because it needs to guarantee a forward progress so it cannot depend on any sleepable locks. Currently we simply back off and mark an

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-17 Thread Michal Hocko
On Mon 16-07-18 16:12:49, Andrew Morton wrote: > On Mon, 16 Jul 2018 13:50:58 +0200 Michal Hocko wrote: > > > From: Michal Hocko > > > > There are several blockable mmu notifiers which might sleep in > > mmu_notifier_invalidate_range_start and that is a problem

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-19 Thread Michal Hocko
Does anybody see any reasons why this should get into mmotm tree? I do not want to rush this in but if general feeling is to push it for the upcoming merge window then I will not object. -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-23 Thread Michal Hocko
On Fri 20-07-18 17:09:02, Andrew Morton wrote: [...] > Please take a look? Are you OK to have these in a separate patch? -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mail

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-23 Thread Michal Hocko
On Mon 23-07-18 09:03:06, Michal Hocko wrote: > On Fri 20-07-18 17:09:02, Andrew Morton wrote: > [...] > > Please take a look? > > Are you OK to have these in a separate patch? Btw. I will rebase this patch once oom stuff in linux-next settles. At least oom_lock removal fr

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-23 Thread Michal Hocko
On Mon 23-07-18 09:11:54, Michal Hocko wrote: > On Mon 23-07-18 09:03:06, Michal Hocko wrote: > > On Fri 20-07-18 17:09:02, Andrew Morton wrote: > > [...] > > > Please take a look? > > > > Are you OK to have these in a separate patch? > > Btw. I will

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-23 Thread Michal Hocko
On Fri 20-07-18 16:01:25, Andrew Morton wrote: > On Tue, 17 Jul 2018 10:12:01 +0200 Michal Hocko wrote: > > > > Any suggestions regarding how the driver developers can test this code > > > path? I don't think we presently have a way to fake an oom-killing > &

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-24 Thread Michal Hocko
K(get_mm_counter(mm, MM_SHMEMPAGES))); +out_finish: + trace_finish_task_reaping(tsk->pid); +out_unlock: up_read(&mm->mmap_sem); - trace_finish_task_reaping(tsk->pid); - return true; + return ret; } #define MAX_OOM_REAP_RETRIES 10 -- Mich

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-24 Thread Michal Hocko
oom_reaper: reaped process %d (%s), now anon-rss:%lukB, > file-rss:%lukB, shmem-rss:%lukB\n", > task_pid_nr(tsk), tsk->comm, -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-07-24 Thread Michal Hocko
unction a bit to have unified function exit paths. Suggested-by: Andrew Morton Signed-off-by: Michal Hocko " -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

nouveau driver locks up with 4.11 kernel

2017-08-14 Thread Michal Hocko
03:00.0: fifo: SCHED_ERROR 13 [] 1 nouveau :03:00.0: fifo: runlist update timeout 4249 nouveau 0000:03:00.0: fifo: SCHED_ERROR 13 [] -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: nouveau driver locks up with 4.11 kernel

2017-08-14 Thread Michal Hocko
On Mon 14-08-17 15:27:20, Ilia Mirkin wrote: > On Mon, Aug 14, 2017 at 3:18 PM, Michal Hocko wrote: [...] > > nouveau :03:00.0: fifo: channel 6 [mpv/vo[3535]] kick timeout > > nouveau: mpv/vo[3535]::906f: detach gr failed, -110 > > Are you using mpv in co

Re: [RFC] Per file OOM badness

2018-01-19 Thread Michal Hocko
On Thu 18-01-18 12:01:32, Eric Anholt wrote: > Michal Hocko writes: > > > On Thu 18-01-18 18:00:06, Michal Hocko wrote: > >> On Thu 18-01-18 11:47:48, Andrey Grodzovsky wrote: > >> > Hi, this series is a revised version of an RFC sent by Christian König > &g

Re: [RFC] Per file OOM badness

2018-01-19 Thread Michal Hocko
(adding a field to struct file). Any better idea? I'm considering : to put a callback into file_ops instead. -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [RFC] Per file OOM badness

2018-01-19 Thread Michal Hocko
ing rather specific to the particular subsytem. And my main objection here is that struct file is not a proper vehicle to carry such an information. So whatever the TTM subsystem does it should contribute to generic counters rather than abuse fd because it happens to use it to communicate with userspace.

Re: [RFC] Per file OOM badness

2018-01-19 Thread Michal Hocko
On Thu 18-01-18 18:00:06, Michal Hocko wrote: > On Thu 18-01-18 11:47:48, Andrey Grodzovsky wrote: > > Hi, this series is a revised version of an RFC sent by Christian König > > a few years ago. The original RFC can be found at > > https://lists.freedesktop.org/archives/dri

Re: [RFC] Per file OOM badness

2018-01-19 Thread Michal Hocko
On Fri 19-01-18 09:39:03, Christian König wrote: > Am 19.01.2018 um 09:20 schrieb Michal Hocko: [...] > > OK, in that case I would propose a different approach. We already > > have rss_stat. So why do not we simply add a new counter there > > MM_KERNELPAGES and consider thos

Re: [RFC] Per file OOM badness

2018-01-19 Thread Michal Hocko
On Fri 19-01-18 13:13:51, Michal Hocko wrote: > On Fri 19-01-18 12:37:51, Christian König wrote: > [...] > > The per file descriptor badness is/was just the much easier approach to > > solve the issue, because the drivers already knew which client is currently > > us

Re: [RFC] Per file OOM badness

2018-01-19 Thread Michal Hocko
wrong for almost anybody else. -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [RFC] Per file OOM badness

2018-01-23 Thread Michal Hocko
On Fri 19-01-18 17:54:36, Christian König wrote: > Am 19.01.2018 um 13:20 schrieb Michal Hocko: > > On Fri 19-01-18 13:13:51, Michal Hocko wrote: > > > On Fri 19-01-18 12:37:51, Christian König wrote: > > > [...] > > > > The per file descriptor badness

Re: [RFC] Per file OOM badness

2018-01-23 Thread Michal Hocko
On Tue 23-01-18 15:27:00, Roman Gushchin wrote: > On Thu, Jan 18, 2018 at 06:00:06PM +0100, Michal Hocko wrote: > > On Thu 18-01-18 11:47:48, Andrey Grodzovsky wrote: > > > Hi, this series is a revised version of an RFC sent by Christian König > > > a few years ago. Th

Re: [RFC] Per file OOM badness

2018-01-24 Thread Michal Hocko
On Tue 23-01-18 17:39:19, Michel Dänzer wrote: > On 2018-01-23 04:36 PM, Michal Hocko wrote: > > On Tue 23-01-18 15:27:00, Roman Gushchin wrote: > >> On Thu, Jan 18, 2018 at 06:00:06PM +0100, Michal Hocko wrote: > >>> On Thu 18-01-18 11:47:48, Andrey Grodzovsky wrot

Re: [RFC] Per file OOM badness

2018-01-24 Thread Michal Hocko
On Wed 24-01-18 11:27:15, Michel Dänzer wrote: > On 2018-01-24 10:28 AM, Michal Hocko wrote: [...] > > So how exactly then helps to kill one of those processes? The memory > > stays pinned behind or do I still misunderstand? > > Fundamentally, the memory is only released o

Re: [RFC] Per file OOM badness

2018-01-24 Thread Michal Hocko
On Wed 24-01-18 12:23:10, Michel Dänzer wrote: > On 2018-01-24 12:01 PM, Michal Hocko wrote: > > On Wed 24-01-18 11:27:15, Michel Dänzer wrote: [...] > >> 2. If the OOM killer kills a process which is sharing BOs with another > >> process, this should result in the

Re: [PATCH] mm/swap: add function get_total_swap_pages to expose total_swap_pages

2018-01-29 Thread Michal Hocko
al_swap_pages); > + > static inline unsigned char swap_count(unsigned char ent) > { > return ent & ~SWAP_HAS_CACHE; /* may include SWAP_HAS_CONT flag */ > -- > 2.7.4 -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] mm/swap: add function get_total_swap_pages to expose total_swap_pages

2018-01-29 Thread Michal Hocko
le now. It can't cover the case of the dynamic swap size > increment. I mean: user can use "swapon" to enable new swap file or > swap disk dynamically or "swapoff" to disable swap space. Exactly. Your scaling configuration based on get_nr_swap_pages or the availa

Re: [PATCH] mm/swap: add function get_total_swap_pages to expose total_swap_pages

2018-01-30 Thread Michal Hocko
On Tue 30-01-18 10:00:07, Christian König wrote: > Am 30.01.2018 um 08:55 schrieb Michal Hocko: > > On Tue 30-01-18 02:56:51, He, Roger wrote: > > > Hi Michal: > > > > > > We need a API to tell TTM module the system totally has how many swap > > > c

Re: [RFC] Per file OOM badness

2018-01-30 Thread Michal Hocko
On Tue 30-01-18 10:29:10, Michel Dänzer wrote: > On 2018-01-24 12:50 PM, Michal Hocko wrote: > > On Wed 24-01-18 12:23:10, Michel Dänzer wrote: > >> On 2018-01-24 12:01 PM, Michal Hocko wrote: > >>> On Wed 24-01-18 11:27:15, Michel Dänzer wrote: > > [...]

Re: [PATCH] mm/swap: add function get_total_swap_pages to expose total_swap_pages

2018-01-30 Thread Michal Hocko
On Tue 30-01-18 11:32:49, Christian König wrote: > Am 30.01.2018 um 11:18 schrieb Michal Hocko: > > On Tue 30-01-18 10:00:07, Christian König wrote: > > > Am 30.01.2018 um 08:55 schrieb Michal Hocko: > > > > On Tue 30-01-18 02:56:51, He, Roger wrote: > > >

Re: [PATCH] mm/swap: add function get_total_swap_pages to expose total_swap_pages

2018-02-01 Thread Michal Hocko
y pressure. There are other users of memory on the system other than your subsystem. -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] hugetlb: release pages in the error path of hugetlb_cow() (was: Re: 3.2-rc2+: Reported regressions from 3.0 and 3.1)

2011-11-28 Thread Michal Hocko
etry_avoidcopy: * anon_vma prepared. */ if (unlikely(anon_vma_prepare(vma))) { + page_cache_release(new_page); + page_cache_release(old_page); /* Caller expects lock to be held */ spin_lock(&mm->page_table_lock); retur

[PATCH] drm: fix i_mapping and f_mapping initialization in drm_open in error path

2013-03-26 Thread Michal Hocko
+). Thanks! --- >From a786a701bd6c277329e2b788fea9a69b1c3ced2e Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Tue, 26 Mar 2013 19:04:40 +0100 Subject: [PATCH] drm: fix i_mapping and f_mapping initialization in drm_open in error path Starting with fdb40a08 (drm: set dev_mapping before call

Re: [PATCH] drm: fix i_mapping and f_mapping initialization in drm_open in error path

2013-03-31 Thread Michal Hocko
iput(container_of(dev->dev_mapping, struct inode, i_data)); > dev->dev_mapping = old_mapping; > mutex_unlock(&dev->struct_mutex); -- 1.8.1.5 -- Michal Hocko SUSE Labs ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm: fix i_mapping and f_mapping initialization in drm_open in error path

2013-04-02 Thread Michal Hocko
On Mon 01-04-13 13:14:50, Ilija Hadzic wrote: > > > On Sun, 31 Mar 2013, Michal Hocko wrote: > > >On Sat 30-03-13 18:26:53, Ilija Hadzic wrote: > >>This looks a bit like a hack and it doesn't look right, > >>conceptually. If the call fails, it should

<    1   2   3   >