Re: [PATCH v2 0/5] Optimize iommu_map_sg() performance

2021-01-21 Thread isaacm
On 2021-01-12 08:00, Robin Murphy wrote: On 2021-01-11 14:54, Isaac J. Manjarres wrote: The iommu_map_sg() code currently iterates through the given scatter-gather list, and in the worst case, invokes iommu_map() for each element in the scatter-gather list, which calls into the IOMMU driver

Re: [PATCH 0/5] Optimize iommu_map_sg() performance

2021-01-11 Thread isaacm
On 2021-01-10 23:52, Sai Prakash Ranjan wrote: On 2021-01-11 11:52, Sai Prakash Ranjan wrote: Hi Isaac, I gave this series a go on chromebook and saw these warnings and several device probe failures, logs attached below: WARN corresponds to this code in arm_lpae_map_by_pgsize() if

Re: [PATCH] iommu/io-pgtable-arm: Allow non-coherent masters to use system cache

2021-01-08 Thread isaacm
On 2021-01-08 10:18, Will Deacon wrote: On Fri, Jan 08, 2021 at 11:17:25AM +0530, Sai Prakash Ranjan wrote: On 2021-01-07 22:27, isa...@codeaurora.org wrote: > On 2021-01-06 03:56, Will Deacon wrote: > > On Thu, Dec 24, 2020 at 12:10:07PM +0530, Sai Prakash Ranjan wrote: > > > commit

Re: [PATCH] iommu/io-pgtable-arm: Allow non-coherent masters to use system cache

2021-01-08 Thread isaacm
On 2021-01-07 21:47, Sai Prakash Ranjan wrote: On 2021-01-07 22:27, isa...@codeaurora.org wrote: On 2021-01-06 03:56, Will Deacon wrote: On Thu, Dec 24, 2020 at 12:10:07PM +0530, Sai Prakash Ranjan wrote: commit ecd7274fb4cd ("iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag") removed unused

Re: [PATCH] iommu/io-pgtable-arm: Allow non-coherent masters to use system cache

2021-01-07 Thread isaacm
On 2021-01-06 03:56, Will Deacon wrote: On Thu, Dec 24, 2020 at 12:10:07PM +0530, Sai Prakash Ranjan wrote: commit ecd7274fb4cd ("iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag") removed unused IOMMU_SYS_CACHE_ONLY prot flag and along with it went the memory type setting required for the

Re: [PATCH v2 1/7] iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration

2020-12-23 Thread isaacm
On 2020-12-23 05:44, Robin Murphy wrote: On 2020-12-22 19:54, isa...@codeaurora.org wrote: On 2020-12-22 11:27, Robin Murphy wrote: On 2020-12-22 00:44, Isaac J. Manjarres wrote: The io-pgtable code constructs an array of init functions for each page table format at compile time. This is not

Re: [PATCH v2 3/7] iommu/arm-smmu: Add dependency on io-pgtable format modules

2020-12-23 Thread isaacm
On 2020-12-23 05:05, Robin Murphy wrote: On 2020-12-22 19:49, isa...@codeaurora.org wrote: On 2020-12-22 11:27, Robin Murphy wrote: On 2020-12-22 00:44, Isaac J. Manjarres wrote: The SMMU driver depends on the availability of the ARM LPAE and ARM V7S io-pgtable format code to work properly.

Re: [PATCH v2 1/7] iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration

2020-12-22 Thread isaacm
On 2020-12-22 11:27, Robin Murphy wrote: On 2020-12-22 00:44, Isaac J. Manjarres wrote: The io-pgtable code constructs an array of init functions for each page table format at compile time. This is not ideal, as this increases the footprint of the io-pgtable code, as well as prevents io-pgtable

Re: [PATCH v2 3/7] iommu/arm-smmu: Add dependency on io-pgtable format modules

2020-12-22 Thread isaacm
On 2020-12-22 11:27, Robin Murphy wrote: On 2020-12-22 00:44, Isaac J. Manjarres wrote: The SMMU driver depends on the availability of the ARM LPAE and ARM V7S io-pgtable format code to work properly. In preparation Nit: we don't really depend on v7s - we *can* use it if it's available,

Re: [PATCH 1/3] iommu/io-pgtable-arm: Prepare for modularization

2020-12-21 Thread isaacm
On 2020-12-21 07:22, Robin Murphy wrote: On 2020-12-18 18:59, isa...@codeaurora.org wrote: On 2020-12-18 04:38, Robin Murphy wrote: On 2020-12-18 08:38, Isaac J. Manjarres wrote: The io-pgtable-arm and io-pgtable-arm-v7s source files will be compiled as separate modules, along with the

Re: [PATCH 1/3] iommu/io-pgtable-arm: Prepare for modularization

2020-12-18 Thread isaacm
On 2020-12-18 04:38, Robin Murphy wrote: On 2020-12-18 08:38, Isaac J. Manjarres wrote: The io-pgtable-arm and io-pgtable-arm-v7s source files will be compiled as separate modules, along with the io-pgtable source. Export the symbols for the io-pgtable init function structures for the

Re: [PATCH] mm/usercopy: Use memory range to be accessed for wraparound check

2018-11-14 Thread isaacm
On 2018-11-14 03:46, William Kucharski wrote: On Nov 14, 2018, at 4:09 AM, David Laight wrote: From: William Kucharski Sent: 14 November 2018 10:35 On Nov 13, 2018, at 5:51 PM, Isaac J. Manjarres wrote: diff --git a/mm/usercopy.c b/mm/usercopy.c index 852eb4e..0293645 100644 ---

Re: [PATCH] mm/usercopy: Use memory range to be accessed for wraparound check

2018-11-14 Thread isaacm
On 2018-11-14 03:46, William Kucharski wrote: On Nov 14, 2018, at 4:09 AM, David Laight wrote: From: William Kucharski Sent: 14 November 2018 10:35 On Nov 13, 2018, at 5:51 PM, Isaac J. Manjarres wrote: diff --git a/mm/usercopy.c b/mm/usercopy.c index 852eb4e..0293645 100644 ---

Re: [PATCH] stop_machine: Disable preemption after queueing stopper threads

2018-07-24 Thread isaacm
Hi Sebastian, Thanks for the response. "I haven't look in detail at this but your new preempt_disable() makes things unbalanced for the err != 0 case." This cannot happen. The only possible return values of this function are -ENOENT or 0. In the case where we return -ENOENT, we'll go straight

Re: [PATCH] stop_machine: Disable preemption after queueing stopper threads

2018-07-24 Thread isaacm
Hi Sebastian, Thanks for the response. "I haven't look in detail at this but your new preempt_disable() makes things unbalanced for the err != 0 case." This cannot happen. The only possible return values of this function are -ENOENT or 0. In the case where we return -ENOENT, we'll go straight

Re: [PATCH] stop_machine: Disable preemption after queueing stopper threads

2018-07-23 Thread isaacm
Hi all, Are there any comments about this patch? Thanks, Isaac Manjarres On 2018-07-17 12:35, Isaac J. Manjarres wrote: This commit: 9fb8d5dc4b64 ("stop_machine, Disable preemption when waking two stopper threads") does not fully address the race condition that can occur as follows: On one

Re: [PATCH] stop_machine: Disable preemption after queueing stopper threads

2018-07-23 Thread isaacm
Hi all, Are there any comments about this patch? Thanks, Isaac Manjarres On 2018-07-17 12:35, Isaac J. Manjarres wrote: This commit: 9fb8d5dc4b64 ("stop_machine, Disable preemption when waking two stopper threads") does not fully address the race condition that can occur as follows: On one

Re: [PATCH v4] stop_machine: Disable preemption after queueing stopper threads

2018-07-17 Thread isaacm
Alright, we will make a new patch for this. Thanks for the feedback. Thanks, Isaac Manjarres On 2018-07-17 11:34, Peter Zijlstra wrote: On Tue, Jul 17, 2018 at 09:30:17AM -0700, Isaac J. Manjarres wrote: After cpu_stop_queue_two_works() queues the cpu_stop works for the stopper threads, it

Re: [PATCH v4] stop_machine: Disable preemption after queueing stopper threads

2018-07-17 Thread isaacm
Alright, we will make a new patch for this. Thanks for the feedback. Thanks, Isaac Manjarres On 2018-07-17 11:34, Peter Zijlstra wrote: On Tue, Jul 17, 2018 at 09:30:17AM -0700, Isaac J. Manjarres wrote: After cpu_stop_queue_two_works() queues the cpu_stop works for the stopper threads, it

Re: [PATCH v2] stop_machine: Disable preemption when waking two stopper threads

2018-07-02 Thread isaacm
Hi Peter, Thanks for the feedback. I'll make sure to incorporate it into my next patch, and send that soon. Thanks, Isaac Manjarres On 2018-07-02 05:15, Peter Zijlstra wrote: On Fri, Jun 29, 2018 at 01:55:12PM -0700, Isaac J. Manjarres wrote: When cpu_stop_queue_two_works() begins to wake the

Re: [PATCH v2] stop_machine: Disable preemption when waking two stopper threads

2018-07-02 Thread isaacm
Hi Peter, Thanks for the feedback. I'll make sure to incorporate it into my next patch, and send that soon. Thanks, Isaac Manjarres On 2018-07-02 05:15, Peter Zijlstra wrote: On Fri, Jun 29, 2018 at 01:55:12PM -0700, Isaac J. Manjarres wrote: When cpu_stop_queue_two_works() begins to wake the