From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbdISJlX (ORCPT ); Tue, 19 Sep 2017 05:41:23 -0400 Received: from 8bytes.org ([81.169.241.247]:46836 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750774AbdISJlW (ORCPT ); Tue, 19 Sep 2017 05:41:22 -0400 Date: Tue, 19 Sep 2017 11:41:19 +0200 From: Joerg Roedel To: Sebastian Andrzej Siewior Cc: iommu@lists.linux-foundation.org, vinadhy@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/amd: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->flush_queue Message-ID: <20170919094119.bibxslqyeefbx7gf@8bytes.org> References: <20170906103459.oi2nn7jondjqdo5m@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170906103459.oi2nn7jondjqdo5m@linutronix.de> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On Wed, Sep 06, 2017 at 12:34:59PM +0200, Sebastian Andrzej Siewior 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. I moved the flushing to driver/iommu/iova.c to share it with the Intel IOMMU and possibly other drivers too, so this patch does no longer apply to v4.14-rc1. Can you update the patch to these changes? Regards, Joerg