Dear all, Thank you for the great community support and support from Sebastian to provide me this patch. I wanted to send this email to inform you and perhaps get some information on how I could keep myself updated on updates in regards to linux-rt. I apologize if I'm spamming you with this email.
I noticed `Bug: Scheduling while atomic` on ahci after building 4.9 rt and reported the issue on oftc channel. Sebastian quickly helped me get a patch and my `journalctl -f` was clean without any such messages. Yesterday I decided to build 4.11 without the patch but I saw a whole bunch of similar bug logs not just on ahci but on my nic card as well among a few others. There were a few instances where I had to hard shutdown my machine. I patched 4.11 with Sebastian's patch again and so far it's been okay for about 24 hours and going. My concern is, how I can provide more information to resolve this issue, perhaps in the next release. Please let me know how I can be of help. Thank you On Wed, Sep 6, 2017 at 6:34 AM, Sebastian Andrzej Siewior < [email protected]> wrote: > get_cpu_ptr() disables preemption and returns the ->flush_queue object > of the current CPU. raw_cpu_ptr() does the same except that it not > disable preemption which means the scheduler can move it to another CPU > after it obtained the per-CPU object. > In this case this is not bad because the data structure itself is > protected with a spin_lock. This change shouldn't matter in general > but on RT it does because the sleeping lock can't be accessed with > disabled preemption. > > Cc: Joerg Roedel <[email protected]> > Cc: [email protected] > Reported-by: [email protected] > Signed-off-by: Sebastian Andrzej Siewior <[email protected]> > --- > drivers/iommu/amd_iommu.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c > index 4ad7e5e31943..943efbc08128 100644 > --- a/drivers/iommu/amd_iommu.c > +++ b/drivers/iommu/amd_iommu.c > @@ -1911,7 +1911,7 @@ static void queue_add(struct dma_ops_domain *dom, > pages = __roundup_pow_of_two(pages); > address >>= PAGE_SHIFT; > > - queue = get_cpu_ptr(dom->flush_queue); > + queue = raw_cpu_ptr(dom->flush_queue); > spin_lock_irqsave(&queue->lock, flags); > > /* > @@ -1940,8 +1940,6 @@ static void queue_add(struct dma_ops_domain *dom, > > if (atomic_cmpxchg(&dom->flush_timer_on, 0, 1) == 0) > mod_timer(&dom->flush_timer, jiffies + > msecs_to_jiffies(10)); > - > - put_cpu_ptr(dom->flush_queue); > } > > static void queue_flush_timeout(unsigned long data) > -- > 2.14.1 > >
_______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
