Menu

How to add a queue group?

Anonymous
2015-03-09
2015-03-09
  • Anonymous

    Anonymous - 2015-03-09

    Hi,

    How to add a queue group associated with a specific set of cores?

     
  • Carl Wallén

    Carl Wallén - 2015-03-09

    Hi,

    Try something like:

    em_core_mask_t* mask;
    em_queue_group_t queue_group;
    em_queue_t queue;
    
    em_core_mask_zero(&mask);
    /* include e.g. core 5&6 in the queue group */
    em_core_mask_set(5, &mask);
    em_core_mask_set(6, &mask);
    
    queue_group = em_queue_group_create("my_queue_group", &mask, 0, NULL);
    queue = em_queue_create("my_queue", EM_QUEUE_TYPE_ATOMIC, EM_QUEUE_PRIO_NORMAL, queue_group);
    

    Hope this helps,
    /carl

     
  • Anonymous

    Anonymous - 2015-03-09

    Hi,

    I had the following error:

    EM ERROR:0x80000002 ESCOPE:0xFF000105 core:00 ecount:0(0) em_queue_group.c:819 em_queue_group_mask() Queue group (id=11) in bad state: allocated=1, pending_modify=1

     
    • Matias Elo

      Matias Elo - 2015-03-09

      Hi,

      em_queue_group_create() is asynchronous, so you have to make sure it has finished before calling em_queue_create(). You do this by using notifications. Example of this can be found in 'event_test/performance/perf_queue_groups.c'.

      -Matias

       

Log in to post a comment.