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


Groups > linux.kernel > #1724844

Re: [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code

From Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Newsgroups linux.kernel
Subject Re: [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code
Date 2017-09-01 09:50 +0200
Message-ID <ukOSd-Pw-3@gated-at.bofh.it> (permalink)
References <ufOg9-3uF-15@gated-at.bofh.it> <uhAC7-7kw-17@gated-at.bofh.it> <ukDap-1iX-1@gated-at.bofh.it> <ukDk6-1mJ-17@gated-at.bofh.it> <ukDtL-1q4-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

> Thanks,
> 
> 	tglx

Sebastian

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


Thread

Re: [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id()  use in preemptible code Thomas Gleixner <tglx@linutronix.de> - 2017-08-31 21:20 +0200
  Re: [patch-rt] drivers/zram: fix zcomp_stream_get()  smp_processor_id() use in preemptible code Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-08-31 21:30 +0200
    Re: [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id()  use in preemptible code Thomas Gleixner <tglx@linutronix.de> - 2017-08-31 21:40 +0200
      Re: [patch-rt] drivers/zram: fix zcomp_stream_get() smp_processor_id()  use in preemptible code Thomas Gleixner <tglx@linutronix.de> - 2017-09-01 09:50 +0200
      Re: [patch-rt] drivers/zram: fix zcomp_stream_get()  smp_processor_id() use in preemptible code Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-09-01 09:50 +0200

csiph-web