Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Preemption Support #98

Closed
wants to merge 3 commits into from
Closed

Preemption Support #98

wants to merge 3 commits into from

Conversation

ryao
Copy link
Contributor

@ryao ryao commented Apr 18, 2012

This includes a patch by kylef that implements preemption support. It appears to resolve issues in supporting kernel preemption.

@ryao
Copy link
Contributor Author

ryao commented Apr 27, 2012

kylef's patch was not ANSI C89 compliant, which caused a build failure with --enable-debug. I have added a commit to fix that.

@ierdnah
Copy link

ierdnah commented Jun 18, 2012

@ryao please rebase on spl-0.6.0-rc9

kylef and others added 3 commits June 18, 2012 16:21
Revert commit 7731d46
Make spl_magazine_age() preempt-safe

Reviewed-by: Richard Yao <ryao@cs.stonybrook.edu>
…cb6b9d598a86b7d

Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
@ryao
Copy link
Contributor Author

ryao commented Jun 18, 2012

@ierdnah My tree should now be in sync.

@ierdnah
Copy link

ierdnah commented Jun 19, 2012

Thanks, it's ok now. I'm running zfs with a preemptible kernel.

@behlendorf
Copy link
Contributor

Finally, I would have expected you to also see issues in spl_cache_refill() since smp_processor_id() is called outside of the spin_lock(). Have you not seen warnings about this on the console? Although I'd expect them to be harmless and pretty easily fixed by pulling this under the spin_lock taken a few lines down. Care would just need to be taken to drop the spin_lock in the existing error case.

@ryao If you could rework these patches I think we can get them. They are all straight forward enough.

@ryao
Copy link
Contributor Author

ryao commented Jul 16, 2012

@behlendorf I have not seen that issue, although I have had preemption off for a while so that I could focus my attention on other areas. I was hitting too many issues related to PF_MEMALLOC at the time and I wanted to focus on ironing those out. I will turn my attention back to this soon.

behlendorf pushed a commit to behlendorf/spl that referenced this pull request Aug 24, 2012
The spl_magazine_age function had the implied assumption that it will
remain on its current cpu through its execution. In order to support
preempt enabled kernels, this assumption had to be removed.

The spl_kmem_magazine structure now holds the cpu id of the cpu it is
local to. This allows spl_magazine_age to use this field when scheduling
work to be done by the magazine's local cpu.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#98
@behlendorf
Copy link
Contributor

The following two commits in master should make the SPL preempt safe. However, the configure checks have been left in place for now until the zfs component is done and we can verify these changes resolve the issues as expected.

08850ed Avoid calling smp_processor_id in spl_magazine_age
9baf44b Wrap trace_set_debug_header in trace_[get|put]_tcd

@behlendorf behlendorf closed this Aug 24, 2012
behlendorf pushed a commit that referenced this pull request Aug 24, 2012
To support preempt enabled kernels in ZFS on Linux, there are a couple
places where the ZFS code needs to disable interrupts. This change adds
the Solaris preempt functions and maps them to the equivalent ZFS
functions, allowing the ZFS to make use of them.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #98
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants