From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Roger B. Melton" Subject: Re: [PATCH v2] eal: fix compile error for old glibc caused by pthread_setname_np() Date: Wed, 25 Nov 2015 09:20:12 -0500 Message-ID: <5655C39C.3000201@cisco.com> References: <20151124184755.GA26521@sivlogin002.ir.intel.com> <1448450035-23991-1-git-send-email-ferruh.yigit@intel.com> <5655BCE7.2060206@cisco.com> <2717285.tnY9sUhdx2@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from alln-iport-4.cisco.com (alln-iport-4.cisco.com [173.37.142.91]) by dpdk.org (Postfix) with ESMTP id A30D2918F for ; Wed, 25 Nov 2015 15:20:17 +0100 (CET) In-Reply-To: <2717285.tnY9sUhdx2@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/25/15 9:03 AM, Thomas Monjalon wrote: > 2015-11-25 08:51, Roger B. Melton: >> Have you thought about a way to set thread name when glibc < 2.12. I >> also ran into the problem recently and played around with prctl() >> (Linux) to set thread (process) name. e.g. >> >> ret = prctl(PR_SET_NAME,,0,0,0); >> >> >> There are 2 issues I think: >> >> 1) The semantics are different than prthread_setname_np(). With >> pthread_setname_np() a name can be assigned to any thread, with >> prctl() the name is assigned to the active thread. That would mean >> that rather than rte_eal_init(), rte_eal_intr_init() could not >> assign thread names. Rather the threads would have to name themselves. >> >> 2) I think BSD lacks prctl(), but some (not all?) BSD >> implementations have setproctitle() to do the same thing. >> >> >> It might be too late for 2.2, but something to think about for the future. > I don't think this feature is important enough to deal with old environments > and to risk some complicated bugs. > Do you think it deserves more tricks? > . > I agree with you Thomas. While I am one of those living in an old environment, I believe that the complications of the tricks out weight the debug benefit. However there may be other in the community who have a different view, so I thought I would at least suggest that there are alternatives. Thanks, -Roger