Skip to content

Conversation

WenyuanShao
Copy link
Contributor

Summary of this Pull Request (PR)

Add description here.

Intent for your PR

Choose one (Mandatory):

  • This PR is for a code-review and is intended to get feedback, but not to be pulled yet.
  • This PR is mature, and ready to be integrated into the repo.

Reviewers (Mandatory):

(Specify @<github.com username(s)> of the reviewers. Ex: @user1, @user2)

Code Quality

As part of this pull request, I've considered the following:

Style:

  • Comments adhere to the Style Guide (SG)
  • Spacing adhere's to the SG
  • Naming adhere's to the SG
  • All other aspects of the SG are adhered to, or exceptions are justified in this pull request
  • I have run the auto formatter on my code before submitting this PR (see doc/auto_formatter.md for instructions)

Code Craftsmanship:

  • I've made an attempt to remove all redundant code
  • I've considered ways in which my changes might impact existing code, and cleaned it up
  • I've formatted the code in an effort to make it easier to read (proper error handling, function use, etc...)
  • I've commented appropriately where code is tricky
  • I agree that there is no "throw-away" code, and that code in this PR is of high quality

Testing

I've tested the code using the following test programs (provide list here):

  • micro_booter
  • unit_pingpong
  • unit_schedtests
  • ...(add others here)

Core_1:
- thread 1: yield to thread 2,
- thread 2: yield to thread 1,
- thread 3: suspend on arcv end point
Core_2:
- thread 4: sending IPI to thread 3.
- Fix praoblems in Lazy_update in the kernel
- Merge with Xinyu's main branch to get rid of potential 64bit problems
- Fix 64bit message passing and bit packing problems in the syscall and stubs
- Cherrypick commits from Xinyu's code to rule out the %%ebp problem.
TODO: cleaning the print messages and further test IPI
resolve remained merge probelm. Cuurently, arcv and thd is correct for cos_rcv.
have another bug which ip=0 rax=0xdeaddead.
+ capmgr
+ sched
+ lib/crt
+ lib/kernel
+ lib/slm
remainig:
+ some kernel message
+ capmgr stubs can be improved
+ sched tok
- optimize capmgr stubs, mainly on the aep related calls.
- remove debug message in the kernel.
- small fix in testing component.
TODO: fix the sched_token passed using the dispatch logic.
- optimize scb allocation,
- fix problem which causes application component doesn't have scb,
- try to solve the problem with sched_tok. In fact this will require kernel changes and likely some redesign. I want to merge with MPK before doing it
- Fix clobber list problem which causes stack problem after user-level dispatch,
- Remove print messages,
- Fix a small bug in the kernel for a corner case.
- Manually fix conflicts,
- Hack some argument passing for COMPACTVATION and THDACTIVATION.
- capinv.c fix getting current component for invstk.
- kernel_test fix cos_thd_alloc().
- micro_xcpu fix argument missing.
- small hack in kernel to get room for scb,
- fix ipi test
- fix a very small issue in argument passing of THDACTIVATE.
- add scb_cached which points to the scb of the scheduling thread.
- optimize scb and dcb allocation.
- remove scb_mapping interface.
- add an API back to capmgr to get scb and dcb address of scheduler component.
…rrent activate componet and wait for clean up
- /kernel/capinv.c
- /kernel/include/thd.h
- /kernel/include/inv.h
- /lib/slm/slm_private.c
+ add som global defines to replace some magic numbers.
+ add authntication token checks in thread dispatch for every wrpkru.
+ do a load after wrpkru to make sure we are in the correct portection domain.
+ remove some debug messages.
+ add checks for protdom key of the scheduler which we are now hard coded in the dispatch logic.
+ remove scb mapping and allcation from crt_comp_exec.
+ add scb allocation to ulk_init.
+ add sinv call to capmgr to use crt api allcating scb_uaddr and mapping.
+ use crt api to allcate vaddr for dcb as well.
+ fix the problem which cause capmgr can't find its scb_uaddr,
+ fix the problem in the call gate which prevent getting the correct coreid using
+ Add message so that it is easier to update SCHED_MPK_KEY,
+ TODO: unitslite fails when quantum smaller than 100, could be a risk.
+ TODO: clean the code and remove debug messages.
+ TODO: possibly can move crt->scb to cos_compinfo->scb. Not sure if worth the time.
+ TODO: multicore initialization still needs to be tested.
+ fixed the risk when quantum < than 1000,
+ small fixes mainly in capmgr initialization which prevent boot on multiple core.
+ fix dcb allcation for protected dispatch which we use to have an per-core dcb page.
+ TODO the thread allocation still not working for core number greater than 3.
+ fix in lazy_update to switch back to the scheduler's protection domain if dcb->sp != 0 while interrupt happens
+ remove debug messages.
+ remove assertion in scb which check if scb->thdcap and scb->tid are pointing to the same thread.
+ TODO: combine tid and thdcap in the same field.
+ make tid | thdcap in scb->thdpack
+ delete debug message
+ add ifdefs on protected dispatch specific code.
+ fix an issue in crt which cause heap_ptr been incorrect,
+ make the ulk_invstk allocation work for multicore,
+ remove debug message,
+ add ifdefs to enable, disable slite, protected_dispatch,
+ test unittests for slite and mpk,
+ test memcached + dpdk + lwip.
+ fix the dcb offset issue,
+ fix one previous fix not working which aims to fix an edge case when having slite and MPK both in the system,
+ fix the dispatch logic based on the changes we've made for protected dispatch.
+ working on improve the ifdefs,
+ remove debug messages.
+ I have several rdpids which I haven't change them to rdtscp, this commit is to fix those.
+ fix some aligments cause by the size of a tab, locally.
+ delete some debug message.
+ if switch to same thread and no preemption, there will be a risk in the kernel when deciding the ip address.
+ small fix on the ifdefs.
+ working on getting numbers and running on 16 cores.
+ can't map over 512MB memory to capmgr which is caused by didn't merge part of booting code.
+ llbooter makes assumptions which components already has valid capablities equals BOOT_CAPTBL_FREE.
+ fix a bug which causes cos_scb_info take too much space and finially causing overflow on scb_kaddr with large number of cores.
+ add static assertions to prevent that from happening.
+ fix an issue introduced from betahxy/composite.git dev_debug branch, which will cause deadloops in the callgate.
+ add warning comments so if in the future somebody decide to change this code hopefully won't run into the same bug.
+ remove debug messages.
…roblem when trying to delegate more memory to capmgr.
… debug purpose and needs to be cleaned. But this is a working version.
+ fix some debug messages,
+ update application component which enables parameters from run script,
+ let capmgr to get more memory for 2 memcached instance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants