On Thu, Sep 18, 2025 at 10:47:48AM -0300, Fabiano Rosas wrote:
> I'm thinking if it's possible for a premature termination to be detected
> by TLS before we did the shutdown(). So my suggestion was to always
> bye() before shutdown(), not matter the state migration is in. But maybe
> your way is ok, I'm not sure now. Let me read the other versions of the
> series...

For failing / cancelling migrations, premature termination is likely fine.
IMHO we also shouldn't care too much on error reports on premature
terminations because it's failing anyway.

So maybe you're talking about shutdown()s when the migration is
successfully completed.

We can try to do that, but maybe it's not easily doable.  E.g., we have the
preempt thread currently only be able to be kicked out by a shutdown() from
the dst main thread.  While we can start to inject a bye() there before the
shutdown(), it'll be:

  (1) a bye() sent concurrently while the preempt thread is still logically
  owning and operating on the preempt channel (luckily, so far read-only),
  and,

  (2) we need to double check if this works if we send bye(WR) from dest to
  src and whether it'll also gracefully shutdown the src side.

  (3) currently, a shutdown() is synchronous.  bye() is yet not.  We may
  then need similiar treatment (e.g. changing IO to block tempoararily?)
  when doing explicit shutdown()s.

I very vaguely remember when working on this series I tried (2) and it
didn't really work, but I'm not very sure. Anyway, all these will add some
complexity, and we'd better justify it's worthwhile..

[...]

> Ah, sorry, I didn't see the v2 on my list. But it's there.

Nah, that's not your fault, maybe mine.

-- 
Peter Xu


Reply via email to