lkml.org 
[lkml]   [2016]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH/RFC] z3fold: use per-page read/write lock
Date
Vitaly Wool <vitalywool@gmail.com> writes:

> Most of z3fold operations are in-page, such as modifying z3fold
> page header or moving z3fold objects within a page. Taking
> per-pool spinlock to protect per-page objects is therefore
> suboptimal, and the idea of having a per-page spinlock (or rwlock)
> has been around for some time. However, adding one directly to the
> z3fold header makes the latter quite big on some systems so that
> it won't fit in a signle chunk.

> + atomic_t page_lock;

This doesnt make much sense. A standard spinlock is not bigger
than 4 bytes either. Also reinventing locks is usually a bad
idea: they are tricky to get right, you have no debugging support,
hard to analyze, etc.

-Andi

\
 
 \ /
  Last update: 2016-11-06 00:39    [W:0.042 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site