[ 
https://issues.apache.org/jira/browse/YARN-6852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119593#comment-16119593
 ] 

Sunil G commented on YARN-6852:
-------------------------------

Thanks [~leftnoteasy] for the patch.

Few minor comments:
In {{get_numbers_split_by_comma}}
# its better to pass {{input}} as const
# in below code
{code}
67        while (p != NULL) {
68          int n = strtol(p, NULL, 0);
69          n_numbers++;
{code}
If {{strtol}} fails, we need to check {{errno}} and then process the input, 
correct?
# One more doubt
{code}
106       // Use cgroup helpers to blacklist devices
107       for (int i = 0; i < n_minor_devices_to_block; i++) {
108         char param_value[128];
109         snprintf(param_value, sizeof(param_value), "c %d:%d rwm",
110                  major_device_number, i);
{code}
Is {{param_value}} null terminated after the printf?
# One more small suggestion
{{update_cgroups_parameters_func_p}} takes input like "devices" or "deny". Is 
it better to define all such "entities" and "verbs" in to a common include and 
use as macro?

> [YARN-6223] Native code changes to support isolate GPU devices by using 
> CGroups
> -------------------------------------------------------------------------------
>
>                 Key: YARN-6852
>                 URL: https://issues.apache.org/jira/browse/YARN-6852
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Wangda Tan
>            Assignee: Wangda Tan
>         Attachments: YARN-6852.001.patch, YARN-6852.002.patch, 
> YARN-6852.003.patch, YARN-6852.004.patch
>
>
> This JIRA plan to add support of:
> 1) Isolation in CGroups. (native side).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to