[ 
https://issues.apache.org/jira/browse/TS-4806?focusedWorklogId=28089&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-28089
 ]

ASF GitHub Bot logged work on TS-4806:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Sep/16 00:36
            Start Date: 05/Sep/16 00:36
    Worklog Time Spent: 10m 
      Work Description: Github user PSUdaemon commented on a diff in the pull 
request:

    https://github.com/apache/trafficserver/pull/956#discussion_r77461688
  
    --- Diff: iocore/eventsystem/UnixEventProcessor.cc ---
    @@ -152,6 +155,59 @@ EventProcessor::start(int n_event_threads, size_t 
stacksize)
     #else
           Debug("iocore_thread", "EThread: %d %s: %d", i, obj_name, 
obj->logical_index);
     #endif // HWLOC_API_VERSION
    +    }
    +#endif // TS_USE_HWLOC
    +
    +    snprintf(thr_name, MAX_THREAD_NAME_LENGTH, "[ET_NET %d]", i);
    +#if TS_USE_HWLOC
    +    if (obj_count > 0) {
    +      hwloc_membind_policy_t mem_policy = HWLOC_MEMBIND_DEFAULT;
    +      hwloc_nodeset_t nodeset           = hwloc_bitmap_alloc();
    +      int num_nodes                     = 0;
    +
    +      hwloc_cpuset_to_nodeset(ink_get_topology(), obj->cpuset, nodeset);
    +      num_nodes = 
hwloc_get_nbobjs_inside_cpuset_by_type(ink_get_topology(), obj->cpuset, 
HWLOC_OBJ_NODE);
    +
    +      if (num_nodes == 1) {
    +        mem_policy = HWLOC_MEMBIND_BIND;
    +      } else if (num_nodes > 1) {
    +        mem_policy = HWLOC_MEMBIND_INTERLEAVE;
    +      }
    +
    +      if (mem_policy != HWLOC_MEMBIND_DEFAULT) {
    +        hwloc_set_membind_nodeset(ink_get_topology(), nodeset, mem_policy, 
HWLOC_MEMBIND_THREAD);
    +      }
    +
    +      if (ats_hugepage_enabled()) {
    +        stack = ats_alloc_hugepage(stacksize);
    --- End diff --
    
    What do you mean by "smaller than a huge page?" Further up I align the 
stack size to the chosen page alignment. So it should be able to use the entire 
huge page we give it.
    
    The reason is the default 1MB stack size would use 256 4k pages. So 1 huge 
page seems better, and it's likely what the user wants if they have chose to 
enable huge pages in the first place.


Issue Time Tracking
-------------------

    Worklog Id:     (was: 28089)
    Time Spent: 2h 40m  (was: 2.5h)

> Fix up event processor thread stacks
> ------------------------------------
>
>                 Key: TS-4806
>                 URL: https://issues.apache.org/jira/browse/TS-4806
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Phil Sorber
>            Assignee: Phil Sorber
>             Fix For: 7.0.0
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Fix event processor to create stacks on the appropriate numa node and with 
> the appropriate page size. Also, stop using the main thread as ET_NET 0 since 
> we can't control any of these aspects of it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to