Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
M
margo
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • sds
  • margo
  • Issues
  • #6

Closed
Open
Opened Mar 21, 2016 by Jonathan Jenkins@jenkins
  • Report abuse
  • New issue
Report abuse New issue

margo pool size and noop ults

In #5 (closed) @carns put in support for margo playing nicely in a "single thread" context (RPC runners in the same physical thread as margo progress). Here's the relevant code:

ABT_pool_get_total_size(mid->progress_pool, &size);
if(size > 0)
{
    HG_Progress(mid->hg_class, mid->hg_context, 0);
    ABT_thread_yield();
}
else
{
    HG_Progress(mid->hg_class, mid->hg_context, 100);
}

Can't remember now, but there was at least some conversation about whether the size > 0 check is the "right" one to make. The server example program would imply that it's not - the pool size is always >= 1 due to the main thread being in the same pool as the one given to margo (causing the thread to revert to strictly polling). However, in my leveldb-hgbots example program, I create a new (empty) pool and thread for the program to run on, sleeping the main thread. Behavior there is as expected.

So how do we reconcile these two configurations? Does it suffice to add a parameter to margo_init indicating that there will be a ULT waiting on completion that it can safely ignore?

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: sds/margo#6