Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeslice reset is not tested for interrupt-induced swaps #3668

Closed
zephyrbot opened this issue Jun 1, 2017 · 13 comments
Closed

timeslice reset is not tested for interrupt-induced swaps #3668

zephyrbot opened this issue Jun 1, 2017 · 13 comments
Labels
area: Tests Issues related to a particular existing or missing test Enhancement Changes/Updates/Additions to existing features priority: low Low impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented Jun 1, 2017

Reported by Andrew Boie:

The schedule_api test_sched_timeslice_reset code currently only evaluates two cases:

  1. Cooperative context switches
  2. Timeslice expiry

However there is a third case, if thread X is timeslicing, gets an interrupt which causes thread Y to be scheduled, AND Y is also timeslicing, then Y's timeslice needs to be reset. This requires modification to the interrupt handling code and is currently only implemented on ARM and X86.

Extend this test case to simulate and test this scenario.

(Imported from Jira ZEP-2232)

@zephyrbot
Copy link
Collaborator Author

by Mark Linkmeyer:

Since previously assigned to Sharron, I'm reassigning now to Chandrakala Kempanna .

@zephyrbot
Copy link
Collaborator Author

by Andrew Boie:

Please note: when you implement this, you will see that this is not implemented correctly on ARC and Xtensa (ZEP-2233, ZEP-2234)

@zephyrbot
Copy link
Collaborator Author

Related to ZEP-2234

@zephyrbot
Copy link
Collaborator Author

Related to ZEP-2233

@zephyrbot zephyrbot added priority: low Low impact/importance bug area: Testing bug The issue is a bug, or the PR is fixing a bug labels Sep 23, 2017
@nashif nashif added this to the v1.11.0 milestone Dec 6, 2017
@carlescufi
Copy link
Member

@youvedeep do you plan on fixing this for the 1.11 timeframe? This is around end of February

@carlescufi carlescufi modified the milestones: v1.11.0, v1.12.0 Mar 9, 2018
@ramakrishnapallala
Copy link

@nashif can we move this to v1.13?

@nashif nashif removed this from the v1.12.0 milestone Jun 5, 2018
@nashif
Copy link
Member

nashif commented Jul 25, 2018

@ramakrishnapallala it is 1.13 time now, @kumarvikash1 can you please assign to someone please?

@pizi-nordic
Copy link
Collaborator

FYI: @pizi-nordic

@nashif
Copy link
Member

nashif commented Aug 31, 2018

@kumarvikash1 ping

@spoorthik
Copy link
Contributor

@andrewboie @andyross: Do we still have the mentioned scenario for x86 and ARM only? Would you please provide some background on this issue with respect to current scheduling mechanisms?

@andyross
Copy link
Contributor

I can't speak to existing test coverage (except that I don't remember hitting a case like this), but FWIW: in the new implementation, there is only one timeslice counter (well, strictly one per CPU). It's not owned by a thread and thus the posited edge case can't happen. It gets reset any time a new thread gets scheduled for any reason. Can't hurt to have more test cases though.

@galak galak added Enhancement Changes/Updates/Additions to existing features and removed bug The issue is a bug, or the PR is fixing a bug labels Dec 6, 2018
@carlescufi carlescufi added area: Tests Issues related to a particular existing or missing test and removed area: Testing labels Apr 30, 2020
@carlescufi
Copy link
Member

@andyross can this be closed?

@andyross
Copy link
Contributor

Wow, this one is old. I'd say close it. The test_sched_timeslice_reset case in sched_api definitely tests that timeslices are reset appropriately during preemption events. That's not done via interrupt, per the request above, but I can 100% guarantee that the code path for preemption is the same in both cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Tests Issues related to a particular existing or missing test Enhancement Changes/Updates/Additions to existing features priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests