Skip to contentSkip to conversation

Lock free fd lookup

RFC Manfred Spraul 2 participants 2 messages Jul 17, 2004

lore
Share & tools
lore
#0 lore raw

wli wrote

Quoted 8 lines
Quoted 4 lines

* It requires type stable storage. That is, once a data area has been allocated to a particular structure type, it always contains that structure type, even when it has been freed from the list. Each list requires its own free pool, which can never be returned to the OS.

The last of these is particularly lethal.

It might be possible to combine such a lock free algorithms with RCU and then set Hugh's SLAB_DESTROY_BY_RCU: It inserts a call_rcu between leaving the free pool and returning the page to the OS.

--
Manfred

#1 lore raw
Quoted 4 lines · Keith Owens
Quoted 4 lines
Quoted 4 lines

It requires type stable storage. That is, once a data area has been
allocated to a particular structure type, it always contains that structure type, even when it has been freed from the list. Each list requires its own free pool, which can never be returned to the OS.

wli wrote

Quoted 1 line
Quoted 1 line

The last of these is particularly lethal.

Quoted 3 lines · Manfred Spraul

It might be possible to combine such a lock free algorithms with RCU and then set Hugh's SLAB_DESTROY_BY_RCU: It inserts a call_rcu between leaving the free pool and returning the page to the OS.

At least I would prefer such a hybrid algorithm if things of this kind were used in the kernel. From the looks of it, in such algorithms the structure is still valid for checking of tickets after a voluntary preemption, in this RCU hybrid not.

-- wli