lkml.org 
[lkml]   [2017]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code
On Fri, 1 Sep 2017, Sebastian Andrzej Siewior wrote:

> On 2017-08-31 21:32:30 [+0200], Thomas Gleixner wrote:
> > > zram_lock_table() is bit_spin_lock() on !RT and spin_lock(&table->lock);
> > > on RT. So this is done.
> > > !RT has this running in a kmap_atomic() section so they have no
> > > preemption there.
> > > zcomp_stream_get() returns a per-CPU object which is protected with a
> > > spinlock and only accessed locked.
> >
> > So when we are inside a spinlocked section, why is this_cpu_ptr() not
> > working? That does not make sense.
>
> zram_decompress_page() invokes zcomp_stream_get() within a spin_lock
> section (zram_lock_table()). This is fine.
> zram_bvec_write() does not invoke zcomp_stream_get() within a spin_lock
> section.

Fair enough.

\
 
 \ /
  Last update: 2017-09-01 09:49    [W:0.083 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site