macOS poll() tracking issue #28297

issue Sjors openend this issue on August 18, 2023
  1. Sjors commented at 3:31 pm on August 18, 2023: member

    Since #14336 we use poll() on systems which support it properly and fall back to select() otherwise. @jamesob did some research on the implementation used on macOS and found it lacking. Although in principle our current use of it shouldn’t cause a problem.

    I checked to see if perhaps Apple has improved things since 2018. They moved the repo, so the knote_fdfind implementation is now here: https://github.com/apple-oss-distributions/xnu/blame/main/bsd/kern/kern_event.c#L6198

    Other than using a reference on one line (struct filedesc *fdp = &p->p_fd;) nothing has changed.

    In other words, we should probably leave things as they are for now, unless there’s another pressing reason to prefer poll() over select().

  2. fanquake commented at 3:33 pm on August 18, 2023: member

    In other words, we should probably leave things as they are for now,

    So no need for an issue then? This is already tracked in the code.

  3. maflcko added the label Brainstorming on Aug 18, 2023
  4. maflcko added the label macOS on Aug 18, 2023
  5. maflcko added the label P2P on Aug 18, 2023
  6. maflcko added the label Needs rebase on Aug 18, 2023
  7. maflcko removed the label Needs rebase on Aug 18, 2023
  8. Sjors commented at 3:43 pm on August 18, 2023: member
    The code currently refers to a locked pull request where nobody can comment on progress. If you unlock it, then closing this one should be fine.
  9. fanquake commented at 4:18 pm on August 18, 2023: member
    I’d suggest updating the code with any relevant details, if they are missing. There shouldn’t be a reason to comment on 5 year old Pull Requests to “track” things.
  10. Sjors commented at 6:16 pm on August 18, 2023: member
    Ok, I could make a PR with a comment that links directly to the knote_fdfind implementation, plus some of James’s critique on it - which I don’t pretent to understand, but I can copy-paste :-)
  11. fanquake commented at 8:49 am on August 21, 2023: member

    Ok, I could make a PR

    Updating the documentation is better than turning our issue tracker into an Apple kernel issue tracker. Would also suggest opening an issue upstream if there isn’t one already.

  12. Sjors commented at 9:20 am on August 21, 2023: member
    @jamesob can you open an issue upstream?
  13. maflcko commented at 11:18 am on August 28, 2023: member
    Closing for now. Not sure what needs to be done here. Anyone is still free to continue the discussion, or update the source code documentation, or file issues upstream.
  14. maflcko closed this on Aug 28, 2023

  15. Sjors commented at 3:16 pm on August 28, 2023: member
    Underground closed ticket discussions are the best :-)
  16. bitcoin locked this on Aug 27, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-30 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me