From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 4CE335A49 for ; Wed, 11 Feb 2015 18:21:52 +0100 (CET) Received: by mail-wg0-f47.google.com with SMTP id n12so4901926wgh.6 for ; Wed, 11 Feb 2015 09:21:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=9bERmtnIMpqMRn8VOPC5uDw96vdNapchp8RHdqCPjHc=; b=ZzMDIbmmUnK3y4oaFPPydPKSchYWZU/9hSRWRS21qvDEuP1bywxlMk07jN0ewC8tUk 0cP3KQQy+V7gS8uTwHPt3l/3yRn8ogf6ruZ7ZrjSnf4f461s8L1+6wfKfNinl5OEVjek eE46kyAzPN+XLFq8+r5ZGYEOzYEJJmbckCr2L21bAJr+DJm+ObQqg2lLS9Cx3fKxUv0n 35un2DiQchtGhywOt3xyqPBTOfmKy7bBEqSybi/ySSEv3pt5iSOV3o+d4vK8LmvWBV/q P/0bsLSzGcCd4hj0bIKa3KcB9T7tgUS5ZzrczHlKaOGqu8//3EfUaxlAb+FFGdk2+gQa Xhjw== X-Gm-Message-State: ALoCoQknBsq3mJMdFZVt7+7O/m/Lsjdtgktn2l/wJbpBkOq6ur2+N99sogS4bc55+dvO/zcZLLw7 X-Received: by 10.180.99.42 with SMTP id en10mr49585940wib.26.1423675312098; Wed, 11 Feb 2015 09:21:52 -0800 (PST) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id ax10sm2104761wjc.26.2015.02.11.09.21.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Feb 2015 09:21:51 -0800 (PST) Message-ID: <54DB8FB0.2060303@6wind.com> Date: Wed, 11 Feb 2015 18:21:52 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: "Liang, Cunming" , "dev@dpdk.org" References: <1422491072-5114-1-git-send-email-cunming.liang@intel.com> <1422842559-13617-1-git-send-email-cunming.liang@intel.com> <1422842559-13617-18-git-send-email-cunming.liang@intel.com> <54DA43AC.2030108@6wind.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 17/17] timer: add support to non-EAL thread X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 17:21:52 -0000 Hi, On 02/11/2015 07:25 AM, Liang, Cunming wrote: >>> + tim_lcore = rte_get_next_lcore( >>> + priv_timer[lcore_id].prev_lcore, >>> + 0, 1); >>> + priv_timer[lcore_id].prev_lcore = tim_lcore; >>> + } else >>> + tim_lcore = rte_get_next_lcore(LCORE_ID_ANY, 0, 1); >> >> I think the following line: >> tim_lcore = rte_get_next_lcore(LCORE_ID_ANY, 0, 1); >> Will return the first enabled core. >> >> Maybe using rte_get_master_lcore() is clearer? > [LCM] It doesn't expect must to be a master lcore. > Any available lcore is fine, so I think make sense to just use the first enabled core. Yes I agree it does not need to be the master lcore, but until recently the definition of the master lcore was "the first enabled core". I was thinking rte_get_master_lcore() is easier to understand that rte_get_next_lcore(LCORE_ID_ANY, 0, 1). If you still prefer to keep the second one, can you add a comment saying something like "non-EAL thread do not run rte_timer_manage(), so schedule the timer on the first enabled lcore"? Thanks, Olivier