From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752941AbcKIWdH (ORCPT ); Wed, 9 Nov 2016 17:33:07 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43570 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbcKIWdF (ORCPT ); Wed, 9 Nov 2016 17:33:05 -0500 Date: Wed, 9 Nov 2016 14:33:04 -0800 From: Andrew Morton To: Vitaly Wool Cc: Linux-MM , linux-kernel@vger.kernel.org, Dan Streetman , Andi Kleen Subject: Re: [PATCH v3] z3fold: use per-page read/write lock Message-Id: <20161109143304.538885b06a4b5d2289da1e52@linux-foundation.org> In-Reply-To: <20161109115531.81d2a3fd4313236d483510f0@gmail.com> References: <20161109115531.81d2a3fd4313236d483510f0@gmail.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Nov 2016 11:55:31 +0100 Vitaly Wool wrote: > Subject: [PATCH v3] z3fold: use per-page read/write lock I've rewritten the title to "mm/z3fold.c: use per-page spinlock" (I prefer to have "mm" in the title to easily identify it as an MM patch, and using "mm: z3fold: ..." seems odd when the actual pathname conveys the same info.) > > 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. > > This patch implements spinlock-based per-page locking mechanism > which is lightweight enough to fit into the z3fold header.