DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] About the shared flock for hugepage files
@ 2017-09-12  2:16  =?gb18030?B?sNezpMP0?=
  2017-09-12  3:10 ` Jim Thompson
  0 siblings, 1 reply; 4+ messages in thread
From: =?gb18030?B?sNezpMP0?= @ 2017-09-12  2:16 UTC (permalink / raw)
  To: =?gb18030?B?ZGV2?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 867 bytes --]

Hi, everyone,


    I'm a developer from china, now i have a problem is about the shared flock for hugepage files in the function of "map_all_hugepages()".


as follows:
---------------------------------------------------------------------------------------------------
/* set shared flock on the file. */


if (flock(fd, LOCK_SH | LOCK_NB) == -1) {


        RTE_LOG(DEBUG, EAL, "%s(): Locking file failed:%s \n", __func__, strerror(errno));


        close(fd);


        return i;


}


close(fd);

--------------------------------------------------------------------------------------------------
there, it gives a shared flock to each hugepage file in /mnt/huge, and close it right away. 


it makes me puzzled. Why? What doing that is for? 


I'm looking forward to your reply, thank you very much.


best regards,
Bakari.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-19 14:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-12  2:16 [dpdk-dev] About the shared flock for hugepage files  =?gb18030?B?sNezpMP0?=
2017-09-12  3:10 ` Jim Thompson
2017-09-12  3:41   ` [dpdk-dev] =?gb18030?b?u9i4tKO6ICBBYm91dCB0aGUgc2hhcmVkIGZsb2Nr?= =?gb18030?q?_for_hugepage_files?=  =?gb18030?B?sNezpMP0?=
2017-09-19 14:05     ` [dpdk-dev] 回复: About the shared flock for hugepage files Burakov, Anatoly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).