doc/wg/core/notes/core-notes-2021-02-19.md
libtock_Amit: Brad pointed out three PRs #2430, #2443, #2444
Brad: That's 1) the last capsule to switch to new driver 2) removes successWithValue 3) removes legacydriver. In my mind, those are the minimal set missing to make a release candidate. I don't think these are controversial PRs. I just wanted to see if people know other things that need to be merged into the first PR.
Leon: I think we need to go through all the code once more in the kernel crate and check the documentation, especially when there are changes.
Brad: That's a good point. Something we could do during the PR review.
Amit: That shouldn't block an RC though. It can be done concurrently.
Brad: Ehh... Important to do before the merge.
Amit: I thought we'd do rc1 in parallel with PR. So rc1 would be that branch. Then there would also be a PR.
Leon: We do keep merging master into the 2.0 branch.
Brad: I think other things could change in the meantime and it would get confusing.
Amit: My guess is there are outstanding bugs which will be hard to catch from just PR review.
Leon: I'm wondering what degree of stability the thing that lands on master should have. Right now, I don't trust in a high degree of stability.
Johnathan: Right now, we have tested 2.0 on a cortex-m3, but the RISC-V board doesn't even boot.
Leon: I've seen similar behavior. Lots of subtle bugs everywhere still. I want to know if it's okay to have this state on master, or if the pre-release should be a tag of the branch for testing before merging into master.
Brad: That could be the PR I'm talking about.
Amit: We might want to keep PRs to master being changes. And PRs to the branch to be bugfixes.
Brad: But master is going to keep advancing and it will be hard to reconcile.
Amit: But we do want to avoid merging something into master where a bunch of boards don't work. We don't want to break master for people who aren't doing 2.0 stuff.
Amit: I do expect that because 2.0 works on some boards for some drivers, the remaining bugs are hopefully not huge foundational things.
Brad: Hard to say.
Amit: So what's blocking these PRs?
Leon: What's going on with the size impact of the changes?
Amit: Brad's change which removed an unused enum variant inexplicably increased kernel size on a bunch of boards. This is really annoying. Hudson looked into it and found that making the returnCode enum a byte not a word made a little extra code to handle it in a lot of places since it goes in a register. The solution is just to mark it explicitly as an isize which solves the problem and results in a tiny reduction in size as initially expected.
Brad: I though usize was super bad.
Amit: They were the same in my testing.
Hudson: Mine too.
Amit: Anyways, the original change increased things by like 3 KB. Changing to isize reduces by 3.5 KB. Which is to say a net gain of half a kilobyte of space.
Hudson: Yes, that's what I found.
Amit: It is very frustrating. Maybe a good place for research. The compiler could be smarter here.
Amit: Okay, so there are approvals and all of these can be merged. I will do so.
Amit: The only other PR I saw was Leon's from a few week's ago adding a platform helper macro.
Leon: To explain, I just made a new PR that Johnathan wanted which is a draft of making sure callbacks aren't swapped. It adds a method to the platform trait, which allows the kernel to notify all drivers about events like process initialization. When looking at boards with a lot of peripherals, it's like 15 lines of just invoking drivers, which would have to go in each board's main file which didn't seem elegant. So this PR reduces the size of that and wraps things up. I do see Brad's concern that it complicates some things too.
Amit: I haven't looked yet. But in any case, this isn't a blocking issue for 2.0.
Leon: Not at all. We can even reopen it later in my new PR if we agree it's needed.
Amit: Okay, so these three PRs will be merged. Then we'll merge in master to the tock-2.0 branch. Then we'll open a PR merging tock-2.0 into master. That PR will be our chance to start testing.
Hudson: So Leon's new PR could go in after 2.0?
Leon: It can't go in after initial 2.0 release. Because there are important ramifications to userspace, especially libtock-rs. But it doesn't have to be in the initial merge to master, just before the release. I know the last PR didn't do enough, but I think this PR is a more uncontroversial change.
Hudson: I will take a look.
Brad: We can definitely merge it after rc1, but definitely before 2.0 release.
command which enqueues a callback for the service. The callback has a pointer to the shared block of memory and then the service can read and/or modify the block. Then can notify the client back that it's done.tryenter or something like that. But we would need to do that.