Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on macOS (UCS TODO List) #1

Open
hiroyuki-sato opened this issue Mar 22, 2019 · 6 comments
Open

Build on macOS (UCS TODO List) #1

hiroyuki-sato opened this issue Mar 22, 2019 · 6 comments

Comments

@hiroyuki-sato
Copy link
Owner

hiroyuki-sato commented Mar 22, 2019

tweets

TODO

  • UCS:
    • debug/memtrack.c: missing malloc_usable_size
    • sys/event_set.c: EPOLLET alternative in kqueue
    • sys/sock.c: MSG_NOSIGNAL
  • UCT:
    • tcp/tcp_base.c: TCP_SYNCNT in setsockopt
  • UCP:
    • core/ucp_worker.c: missing sys/eventfd.h
  • UCM:
    • util/sys.c: missing linux/mman.h
    • event/event.c: missing SHM_REMAP
    • util/reloc.c: missing link.h

TODO(src/ucs) only

Branches.

  • event_set_functions: This branch split epoll functions into 'ucs/sys/event_set.{c|h}'.
    Created PR [WIP] UCS/API event_set
    After this branch merged, Next step is to modify src/ucs/async/thread.c for using ucs/sys/event_set.{c,h}
    Add kqueue code in ucs/sys/event_set.{c,h}
  • osx_fixes: Fix macOS specific issues.
  • kqueue_test: fored osx_fiexed for testing kqueue system call.

Tips

  • Build specific code: cd src/ucs ; make V=1 sys/libucs_la-event_set.lo
  • Build specific test: GTEST_FILTER='*test_event_set*' make -C test/gtest test
@keisukefukuda
Copy link
Collaborator

keisukefukuda commented Mar 23, 2019

Just memo:

From @shamisp 's info:

  • librt is only for debugging purpose, so it can be disabled
  • libucm can be disabled.

@hiroyuki-sato
Copy link
Owner Author

Thanks!, @keisukefukuda

I add his tweet

@hiroyuki-sato hiroyuki-sato changed the title Build on macOS Build on macOS (UCS TODO List) Apr 21, 2019
@hiroyuki-sato
Copy link
Owner Author

Yossi Itigin comment about async mode in e-mail.

Probably need to wrap this struct def with some #ifdef 's

-----Original Message-----
From: Hiroyuki Sato hiroysato@xxx
Sent: Monday, April 22, 2019 4:11 PM
To: Yossi Itigin yosefe@xxx
Subject: Re: [ucx-group] [Q] async mode (For porting macOS)

Hello, Yossi.

Thank you for your reply.

  • spinlock - need some alternative for macos since spinlock is used a lot in the code, not just for async
    OK. We'll find another way.
  • signal - we can make it unsupported on macos for now
    It's a good news for us.
  • thread - seems kqueue patch should resolve the missing epoll support, right?

Yes, I use kqueue instead of epoll.
https://github.com/hiroyuki-sato/ucx/blob/kqueue_test/src/ucs/async/thread.c
Maybe, this modification almost good, But I have another problem.

I got the following error. timer_t doesn't support macOS. :-(
#10

Best regards.

2019年4月22日(月) 21:57 Yossi Itigin yosefe@xxx:

  • spinlock - need some alternative for macos since spinlock is used a lot in the code, not just for async
  • signal - we can make it unsupported on macos for now
  • thread - seems kqueue patch should resolve the missing epoll support, right?

-----Original Message-----
From: Hiroyuki Sato hiroysato@xxx
Sent: Monday, April 22, 2019 1:10 PM
To: Yossi Itigin yosefe@xxxx
Subject: Re: [ucx-group] [Q] async mode (For porting macOS)

Hello, Yossi.
Thank you for your reply.

There are async mode issues.

  • spinlock
    • pthread_spinlock_t not supported on macOS. (It use in ucs/async/thread.c)
    • We made dummy
      function(ba54755))
  • signal
    • timer_create not support on macOS (It use in ucs/async/signal.c)
    • I can't find alternative solution yet. (dispatch(3)?)
  • thread
    • epoll not support on macOS(It use in ucs/async/thread.c)
    • Now I'm porting thread mode to use kqueue instead of epoll.

Maybe I can port thread mode at first.
If other modes can disable, we focus on other things.

Note.
I update all of the issues about macOS in this issue.
#1

Best regards.

2019年4月22日(月) 18:37 Yossi Itigin yosefe@xxx:

Hi,

Currently async infra has to support all modes, even though 'thread' is actually used.
What are the macOS porting issues? Maybe we can disable 'signal' mode on it.

--Yossi

-----Original Message-----
From: Hiroyuki Sato via ucx-group ucx-group@elist.ornl.gov
Sent: Sunday, April 21, 2019 11:41 AM
To: ucx-group@elist.ornl.gov
Subject: [ucx-group] [Q] async mode (For porting macOS)

Hello, members.

Could you tell me about async mode?

OpenUCX supports multiple async modes(signal, mutex, spinlock, and poll).
For porting macOS, I think It requires one mode only.
(For example, porting signal mode first) Is this correct?
Or, Does it require all modes?

Best regards.

--
Hiroyuki Sato

@Torrekie
Copy link

epoll-shim is now ported to Darwin so we can use this to provide epoll and eventfd

@shamisp
Copy link

shamisp commented Aug 24, 2023

@Torrekie nice !

@hiroyuki-sato
Copy link
Owner Author

@Torrekie Thanks!

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

No branches or pull requests

4 participants