Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1360181
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: 4.5.0+ panic when setup loop device |
| Date | 2016-03-17 21:40 +0100 |
| Message-ID | <rdMS7-3KT-13@gated-at.bofh.it> (permalink) |
| References | (8 earlier) <rdEUy-7h0-15@gated-at.bofh.it> <rdJhw-1oX-21@gated-at.bofh.it> <rdKQi-2sR-21@gated-at.bofh.it> <rdMIq-3Gi-13@gated-at.bofh.it> <rdMIq-3Gi-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 17 Mar 2016, Jens Axboe wrote:
> On 03/17/2016 01:20 PM, Thomas Gleixner wrote:
> > > This might be better, we need to start at -1 to not miss the first one...
> > > Still untested.
> >
> > > +static inline struct blk_mq_ctx *next_ctx(struct request_queue *q, int
> > > *i)
> > > +{
> > > + do {
> > > + (*i)++;
> > > + if (*i < q->nr_queues) {
> > > + if (cpu_possible(*i))
> > > + return per_cpu_ptr(q->queue_ctx, *i);
> > > + continue;
> > > + }
> > > + break;
> > > + } while (1);
> > > +
> > > + return NULL;
> > > +}
> > > +
> > > +#define queue_for_each_ctx(q, ctx, i)
> > > \
> > > + for ((i) = -1; (ctx = next_ctx((q), &(i))) != NULL;)
> > > +
> >
> > What's wrong with
> >
> > for_each_possible_cpu(cpu) {
> > ctx = per_cpu_ptr(q->queue_ctx, cpu);
> >
> > ....
> > }
> >
> > instead of hiding it behind an incomprehensible macro mess?
>
> We might not have mapped all of them.
blk_mq_init_cpu_queues() tells a different story and q->queue_ctx is a per_cpu
allocation.
Thanks,
tglx
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: 4.5.0+ panic when setup loop device Thomas Gleixner <tglx@linutronix.de> - 2016-03-16 16:30 +0100
Re: 4.5.0+ panic when setup loop device Peter Zijlstra <peterz@infradead.org> - 2016-03-17 11:00 +0100
Re: 4.5.0+ panic when setup loop device Peter Zijlstra <peterz@infradead.org> - 2016-03-17 11:00 +0100
Re: 4.5.0+ panic when setup loop device Thomas Gleixner <tglx@linutronix.de> - 2016-03-17 11:30 +0100
Re: 4.5.0+ panic when setup loop device Peter Zijlstra <peterz@infradead.org> - 2016-03-17 11:30 +0100
Re: 4.5.0+ panic when setup loop device Thomas Gleixner <tglx@linutronix.de> - 2016-03-17 12:50 +0100
Re: 4.5.0+ panic when setup loop device Peter Zijlstra <peterz@infradead.org> - 2016-03-17 13:00 +0100
Re: 4.5.0+ panic when setup loop device Borislav Petkov <bp@alien8.de> - 2016-03-17 13:00 +0100
Re: 4.5.0+ panic when setup loop device Thomas Gleixner <tglx@linutronix.de> - 2016-03-17 13:10 +0100
Re: 4.5.0+ panic when setup loop device Jens Axboe <axboe@kernel.dk> - 2016-03-17 17:50 +0100
Re: 4.5.0+ panic when setup loop device Jens Axboe <axboe@kernel.dk> - 2016-03-17 19:30 +0100
Re: 4.5.0+ panic when setup loop device Jens Axboe <axboe@kernel.dk> - 2016-03-17 21:30 +0100
Re: 4.5.0+ panic when setup loop device Thomas Gleixner <tglx@linutronix.de> - 2016-03-17 21:40 +0100
Re: 4.5.0+ panic when setup loop device Jens Axboe <axboe@kernel.dk> - 2016-03-17 21:50 +0100
Re: 4.5.0+ panic when setup loop device Thomas Gleixner <tglx@linutronix.de> - 2016-03-17 21:30 +0100
Re: 4.5.0+ panic when setup loop device Xiong Zhou <jencce.kernel@gmail.com> - 2016-03-18 03:40 +0100
Re: 4.5.0+ panic when setup loop device Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-03-18 05:20 +0100
Re: 4.5.0+ panic when setup loop device Peter Zijlstra <peterz@infradead.org> - 2016-03-18 09:00 +0100
Re: 4.5.0+ panic when setup loop device Peter Zijlstra <peterz@infradead.org> - 2016-03-18 11:20 +0100
Re: 4.5.0+ panic when setup loop device Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-03-18 13:40 +0100
Re: 4.5.0+ panic when setup loop device Peter Zijlstra <peterz@infradead.org> - 2016-03-18 14:40 +0100
Re: 4.5.0+ panic when setup loop device Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-03-18 15:10 +0100
Re: 4.5.0+ panic when setup loop device Thomas Gleixner <tglx@linutronix.de> - 2016-03-18 13:00 +0100
Re: 4.5.0+ panic when setup loop device Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-03-18 13:50 +0100
[tip:x86/urgent] x86/topology: Use total_cpus not nr_cpu_ids for logical packages tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-03-19 10:40 +0100
[tip:x86/urgent] x86/topology: Fix AMD core count tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2016-03-29 10:50 +0200
csiph-web