[PATCH v7] eal: add seqlock

Mattias Rönnblom hofors at lysator.liu.se
Sun May 15 19:54:27 CEST 2022


On 2022-05-15 17:19, Morten Brørup wrote:
>> From: Mattias Rönnblom [mailto:mattias.ronnblom at ericsson.com]
>> Sent: Sunday, 15 May 2022 14.40
>>
>> Two questions remain:
>>
>> 1) Should the seqlock and the seqcount reside in different header
>> files?
>> 2) Is it it good enough to provided only a spinlock-protected seqlock?
>>
>> Question 1 I don't really have an opinion on. Both ways seems perfectly
>> reasonable to me. I noted Morten wanted a split, and left to my own
>> devices this is probably what I would do as well.
> 
> Argument for separate header files: If we add e.g. a rte_seqticketlock_t later, it should be able to include the rte_seqcount_t header file without also getting the contextually irrelevant rte_seqlock_t type and functions.
> 
> I don't feel strongly about this.
> 
>>
>> I think the answer to 2 is yes. We can provide other variants in the
>> future, would the need arise.
> 
> Agree.
> 
>>
>> <snip>
> 
> Please move the header files from /lib/eal/include to /lib/eal/include/generic, where the other lock header files reside.
> 
> 

My guess would be that the lib/eal/include/generic directory is where 
the generic implementations of APIs for which there also exist 
machine-specific implementations go. The seqlock is not an example of such.


More information about the dev mailing list