* [patch] mm/zsmalloc: Use get/put_cpu_light in zs_map_object()/zs_unmap_object()
@ 2016-03-22 10:16 Mike Galbraith
2016-03-29 16:37 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 3+ messages in thread
From: Mike Galbraith @ 2016-03-22 10:16 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, RT
Otherwise, we get a ___might_sleep() splat.
Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
---
mm/zsmalloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1292,7 +1292,7 @@ void *zs_map_object(struct zs_pool *pool
class = pool->size_class[class_idx];
off = obj_idx_to_offset(page, obj_idx, class->size);
- area = &get_cpu_var(zs_map_area);
+ area = per_cpu_ptr(&zs_map_area, get_cpu_light());
area->vm_mm = mm;
if (off + class->size <= PAGE_SIZE) {
/* this object is contained entirely within a page */
@@ -1345,7 +1345,7 @@ void zs_unmap_object(struct zs_pool *poo
__zs_unmap_object(area, pages, off, class->size);
}
- put_cpu_var(zs_map_area);
+ put_cpu_light();
unpin_tag(handle);
}
EXPORT_SYMBOL_GPL(zs_unmap_object);
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] mm/zsmalloc: Use get/put_cpu_light in zs_map_object()/zs_unmap_object() 2016-03-22 10:16 [patch] mm/zsmalloc: Use get/put_cpu_light in zs_map_object()/zs_unmap_object() Mike Galbraith @ 2016-03-29 16:37 ` Sebastian Andrzej Siewior 2016-03-29 17:37 ` Mike Galbraith 0 siblings, 1 reply; 3+ messages in thread From: Sebastian Andrzej Siewior @ 2016-03-29 16:37 UTC (permalink / raw) To: Mike Galbraith; +Cc: RT * Mike Galbraith | 2016-03-22 11:16:09 [+0100]: >Otherwise, we get a ___might_sleep() splat. Applied. A backtrace would be nice … >Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com> Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] mm/zsmalloc: Use get/put_cpu_light in zs_map_object()/zs_unmap_object() 2016-03-29 16:37 ` Sebastian Andrzej Siewior @ 2016-03-29 17:37 ` Mike Galbraith 0 siblings, 0 replies; 3+ messages in thread From: Mike Galbraith @ 2016-03-29 17:37 UTC (permalink / raw) To: Sebastian Andrzej Siewior; +Cc: RT On Tue, 2016-03-29 at 18:37 +0200, Sebastian Andrzej Siewior wrote: > * Mike Galbraith | 2016-03-22 11:16:09 [+0100]: > > > Otherwise, we get a ___might_sleep() splat. > > Applied. A backtrace would be nice … Ugh, I elided it because I thought it didn't add any meat. The cleaning lady (/me) binned it, but can re-create if really needed. -Mike -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-29 17:37 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-22 10:16 [patch] mm/zsmalloc: Use get/put_cpu_light in zs_map_object()/zs_unmap_object() Mike Galbraith 2016-03-29 16:37 ` Sebastian Andrzej Siewior 2016-03-29 17:37 ` Mike Galbraith
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).