tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
cacheline-aligned locks [was Re: RFC: gif(4) MP-ify]
Date: Wed, 6 Jan 2016 14:19:01 +0900
From: Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
I have a question for confirmation. If the struct has two locks for
different purposes, is the COHERENCY_UNIT padding required between
the locks isn't it? E.g. in my old patch(gif-mp-ify.patch), is the
COHERENCY_UNIT padding is required between gif_lock and struct si_sync
which has other lock(si_lock)?
# BTW, struct si_sync is removed by if_gif.h:r1.21
That may be a good idea if you expect simultaneous use of both locks
independently -- as in struct pcq. But without that analysis, it is
likely premature optimization, and the wrangling of COHERENCY_UNIT
alignment inside a struct is more trouble than it's worth. In
contrast, for global locks, the __cacheline_aligned attribute is no
trouble at all.
Home |
Main Index |
Thread Index |
Old Index