Hi,
   Thanks. You mean aync ordering lock needs HW support?  I’m using odp-dpdk in 
virtual machine. So can I use odp_schedule_order_lock_start() and 
odp_schedule_order_lock_wait() for async ordering lock?


BR
Yan Limin

From: Bill Fischofer [mailto:bill.fischo...@linaro.org]
Sent: Tuesday, September 04, 2018 7:45 PM
To: Yan, Liming (NSB - CN/Hangzhou) <liming....@nokia-sbell.com>
Cc: lng-odp-forward <lng-odp@lists.linaro.org>
Subject: Re: [lng-odp] Are those Asynchronous ordered locks available for use 
in 1.19?

Yes, these APIs are available however only platforms with HW support will show 
a practical difference in behavior. These APIs are hints to the implementation, 
which is why you cannot assume you hold the lock until after 
odp_schedule_order_lock_wait() completes.

On Tue, Sep 4, 2018 at 6:41 AM Yan, Liming (NSB - CN/Hangzhou) 
<liming....@nokia-sbell.com<mailto:liming....@nokia-sbell.com>> wrote:
Hi,
  I see in change log:

   Asynchronous ordered locks
   Two new APIs, odp_schedule_order_lock_start() and 
odp_schedule_order_lock_wait() are added to allow for asynchronous ordered lock 
acquisition in addition to the existing synchronous odp_schedule_order_lock() 
API. In some implementations and applications, there may be a performance 
advantage to indicating the intent to acquire an ordered lock to allow the 
implementation to prepare for this while the application continues parallel 
processing and then enter the critical section protected by the ordered lock at 
a later time. In this case ordered lock protection is not guaranteed until the 
odp_schedule_order_lock_wait() call returns.

But when I check the APIs code, seems they're still synchronous calling, 
similar with schedule_order_lock. Maybe I don't get how to use these APIs.  I 
didn't see any examples. So my question is, Are those Asynchronous ordered 
locks available for use?  And how to use them?  Thanks very much.

static void schedule_order_lock_wait(uint32_t lock_index)
{
        schedule_order_lock(lock_index);
}



BR
Yan Limin


Reply via email to