Such a rule can have the opposite effect though, a company may choose to hire/grow more conservatively if it is subject to a condition that it cannot layoff.
When the Fed raises interest rates, it slams on everyone's brakes. Should GlobalFoundries somehow predicted the macro environment, better than everyone else, and followed their gut on reading macro tea leaves and pre-anticipated what the Fed would do? Ideally, yes, they would know the future, but in reality the best laid plans must change to meet reality, as current events always has surprises that can not be 100% derisked.
The comparison does not seem to be apples to apples. The perf gain seems to come from bundling the fork and exec call allowing the kernel to do vfork like optimizations. I think a fair comparison would be against a new sys call that does fork_exec vs io_uring_spawn, and not fork + exec vs io_uring_spawn.
That's absolutely where much of the performance currently comes from, and I did in fact benchmark exactly that and it provides comparable performance (for now). I also noted in my talk that you can get much of the way there by doing clone with CLONE_VM and doing exec from there.
But also, the tricks to make it faster without using io_uring are much less safe than using io_uring. vfork is dangerous.
io_uring is the standard kernel mechanism for doing multiple operations in one syscall, so it seems like the most logical fit for this.
Jens Axboe (io_uring maintainer) and I have many more plans to make this faster.
Leaving that aside, there are many additional capabilities this unlocks. For instance, we can maintain a pool of processes set up and ready to exec.
> I think a fair comparison would be against a new sys call that does fork_exec vs io_uring_spawn, and not fork + exec vs io_uring_spawn.
I agree that's a useful comparison, although the status quo is also worth benchmarking. A fork_exec syscall sounds like a posix_spawn syscall. IIRC, glibc's current posix_spawn is a library function that does a vfork followed by setup operations that portable code isn't allowed to call after vfork.
I think there are two dimensions in which io_uring can be used to amortize/eliminate syscalls:
* sequence of operations: in this case, (v)fork, then setup calls, then exec. This sequence is unusually expensive because doing them separately requires extra page table work (particularly for the fork case, but even for vfork vs having a blank process). A posix_spawn syscall could achieve similar efficiency gains as this io_uring_spawn.
* batches of operations: in this case, lots of processes to spawn. It sounds like he hasn't posted numbers on that and intends to: "He's looking forward to ... supporting a pre-spawned process pool". If that turns out well, then the io_uring approach seems worth doing, and also can be used to implement a new in-user-space posix_spawn, for less total syscall surface area than doing both io_uring and a synchronous posix_spawn syscall. Maybe the supported setup operations also can be in common with io_uring operations for other purposes. I'm curious about that but don't see a link to benchmark code / implementation code / manpage.
I am a fan of io_uring style interfaces and think fork() is completely busted, but I agree that intuitively the comparisons seem to obfuscate where a lot of the perf wins come from
1. posix_spawn() performance seems terrible on Linux. There is just no excuse for it to be worse than vfork()... I know on Linux it is implemented in library code, but on macOS it is a syscall, which achieves most of the stated benefits of io_uring_spawn (batching up all the posix_spawn_actions and then handing them down to the kennel in a single syscall).
2. Again, I think the whole "hope posix_spawn supports the actions you need" is a bit overblown here. It is not like io_uring supports operations for every single syscall that exists either. People keep holding up the lack of some operation in posix_spawn() as a justification for designing a new interface. Just add some new flags and actions (see posix_spawn_file_actions_addchdir_np(), POSIX_SPAWN_SETEXEC, or POSIX_SPAWN_CLOEXEC_DEFAULT on macOS for examples).
Obviously posix_spawn() is a synchronous operation, so in that respect io_uring_spawn is inherently a bit faster for processes that want to asynchronously launch processes, but if Linux implemented posix_spawn() like macOS did then you could achieve the same thing just by adding support for issuing a posix_spawn() operation via io_uring just like any other operation.
Given that io_uring has a lot of momentum and is getting broad support for various operations it probably does make sense to implement io_uring_spawn and then layer posix_spawn() on top of it as proposed in the talk, but I wish the slides called out that a lot of performance gains seem (at least me) to have little to do with the nature of io_uring and more to do with that fact that posix_spawn() is implemented purely in userspace on Linux and can't batch the existing actions because of that.
It looked to me like providing a cleaner interface which still effectively supports everything vfork does, with all the performance gains (and fewer context switches) was in fact the point of the exercise.
This seems to be the number of Americans with a criminal record and not a criminal conviction (someone who was found to be innocent would also be included in this number). I can't seem to find the number of Americans with a conviction though.
My observation is that it actually accelerated said brain-gain.
There was a crackdown on fraudulent H1B applications, with more RFEs being issued. That freed a lot of spots for legitimate applicants that were hogged by questionable bodyshops. It also incentivized attorneys to start looking at O-1 (and they are easier than people think for real engineers to get).
Academically, a lot was written (by foreign universities) about how the US was going to lose it's edge have a drop in applicants but the rankings didn't change during the last 4 years. I wouldn't be surprised if more people applied simply because they (erroneously) believed that admission would be a little less competitive with less applicants.
This is misleading though, because a majority of H1b applications are renewals (so folks already on an H1b), not new applications. On top of that, most renewals happen to be Indian Nationals because they have no pathway to obtain permanent residency in many cases.
Also how does a higher rejection rate lead to brain gain? I'd imagine it discourages a would be immigrant.
Curious what you're implying happened in the US in the last 4 years. Maybe I'm missing some important event other than Covid but that affects all countries.
Thank you for this comment, it made my day. I usually see posts wanting skilled immigrants out. The last few months have been especially bad due to the various policies that have been adopted.
> I usually see posts wanting skilled immigrants out.
You have your answer there. There are a lot of Americans who love and welcome immigrants (and I know many of them – 99% of my friends are American), but there are also many who hate immigrants, and of all places, many of these immigrant-haters have found a home at HN. (Open up any HN thread on US visas and immigration, and the level of immigrant-hatred and xenophobia is truly stunning and appalling.)
These Americans who hate immigrants vote. You can guess what party they vote. Their votes are the reason our immigration system is broken beyond measure.
There was a bill, called the "Gang of Eight" bill (or S.744 of the 113th Congress) which would have fixed many issues with our immigration system. It failed to pass in Congress because of Republican obstructionism. It passed the Senate with a super majority, but was blocked by the House despite majority support because of the GOP speaker not allowing a vote on it, in order to pander to the extreme wing of the party. (Also, as a side note, the GOP's House majority was won in 2012 through gerrymandering – the popular vote for the House in 2012 had been for Democrats.)
If you want an answer to why the immigration system is broken – this is pretty much it. There are plenty of people who hate immigrants, and you can have the displeasure of meeting them, and reading their horrifically anti-immigrant comments right here on HN. They hate immigrants and want immigrants out, so we are at the deplorable place that we find ourselves in today.
> These Americans who hate immigrants vote. You can guess what party they vote. Their votes are the reason our immigration system is broken beyond measure.
I am not sure if that's really the case. Case in point, the Obama administration. They had 8 years to fix this, but they didn't.
Now Obama did do some small changes that were a net positive to the immigrant community (Work Permit for spouses who are waiting for GC, 1 year increase in work permit for students who graduate from US colleges, etc). But all the other bad parts of the system are unchanged.
I'm not sure if you're being facetious here, or if you simply are ignorant of how the U.S. Constitution / government works.
There are two types/levels of federal laws: (1) statutory laws - made by Congress ("U.S.C."/US Code), and (2) regulatory laws ("C.F.R.") - made by the Executive Branch.
For a statutory law to pass in the US, the House + Senate + President has to agree. When one party has control over all 3, it's called a "trifecta". Moreover, in the Senate, you need 60% votes due to the what's called the legislative filibuster.
Democrats had a trifecta only for 2 years (2009 and 2010). During the remaining 6 years that Obama was in office, Republicans blocked practically everything substantive. The Democrats actually did try to pass a small immigration bill (the DREAM Act) during their trifecta, but that bill (S. 2205) got 52-44 votes, and thus failed due to the legislative filibuster. It's extremely difficult to pass statutory laws in the US.
Obama and the Democrats spent put a huge amount of effort trying to fix the immigration system, but they were blocked by Republicans through and through.
> Obama did do some small changes
He actually made a huge number of substantial changes with regard to immigration in our regulatory laws (the CFR). More than any recent President. Obama did everything he could that was within his power (ie within the power granted to him by the Constitution and statutory law).
> I'm not sure if you're being facetious here, or if you simply are ignorant of how the U.S. Constitution / government works.
I do understand that. The thing though is, "trifecta" is difficult in practice and shouldn't really be a barrier to passing laws.
My observation was mainly about fixing and overhauling the immigration system (combating fraud, streamlining it, etc - and not really about increasing or decreasing immigration). I am not sure Republicans were a barrier to such efforts.
> The thing though is, "trifecta" is difficult in practice and shouldn't really be a barrier to passing laws.
This is an illogical sentence. What are you trying to say here. That the US Constitution "shouldn't really be a barrier to passing laws"? Is this a joke? You seem to be utterly unfamiliar with how most constitutional legal systems work. It's not just a Western country. Even countries like India have a similar system. Imagine I go to India and say "the Parliament shouldn't really be a barrier to passing laws". People would laugh at you. You're making a really dumb and nonsensical statement. (And you sound facetious.)
> My observation was mainly about ...
You "observation" was an accusatory statement that the Obama administration "had 8 years to fix this, but they didn't" -- which I pointed out and explained was completely and flat-out wrong.
As I explained in my parent comment, the Obama administration made extensive and substantive changes to the immigration system, within the scope of the Executive Branch's powers. A lot of changes to the CFR (Code of Federal Regulations) affecting immigration, many EOs, memorandas. DACA is a famous example of a positive change they brought about.
More substantive immigration law overhauls are outside the ability of the President to affect. Congress must do it. And Republicans in Congress blocked nearly every bill that was in any way pro-immigrant.
And, no, in the US, you can't say Congress "shouldn't really be a barrier to passing laws". You'll be laughed out the room.
> The thing though is, "trifecta" is difficult in practice and shouldn't really be a barrier to passing laws.
> This is an illogical sentence.
You said Democrats had "trifecta" only two years (2009-10) during the Obama admin. I am assuming you mean they had the executive, house and senate.
I am saying, not controlling all three should not be a barrier to passing laws. You are completely misunderstanding me. I said "trifecta" should not be a barrier because you mentioned Democrats only had it for two years. Does the US constitution say the two chambers AND executive should be controlled by either Republicans or Democrats to enact laws?
> People would laugh at you. You're making a really dumb and nonsensical statement. (And you sound facetious.)
Well, I am glad the people I know would try to understand my point better than just laugh at me or call me dumb :)
> You "observation" was an accusatory statement that the Obama administration "had 8 years to fix this, but they didn't"
And I still stand by it - while supporting the said admin. I did mention they 'made extensive and substantive changes to the immigration system'. However, I still believe there are some changes they could have done (which Republicans would have supported) that would have made the system much better.
You're right in that there were some things that could have been achieved with bipartisan support.
One example would be eliminating the per-country limit on employment-based immigrants, which has resulted in 100+ years of wait time for India-born EB2/EB3 aspirants. There's bipartisan support for it, and it might have passed in isolation, but it wasn't high enough of a priority for either party. (Note though: the provision eliminating the per-country limit was included in the S. 744 bill.)
For the most part though, Republicans opposed nearly every bill that Democrats brought up. The likelihood of anything meaningful / highly-impactful / substantive through Congress, in the face of adamant Republican opposition, was unfortunately fairly low.
> Because they still want to hire lots of Americans. They just don't want to pay them market prices. So they bring in H1-Bs to lower wages. If they hired them overseas, there wouldn't be that effect:
Wow, it takes skill to come up with an argument like that. How do you imagine this conversation happens at MegaCorp_0 between HR and a Hiring manager?
HR: “I know you need someone who has Skill_0, but we want to reduce wages so it has to be a h1b...”