From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail115-63.sinamail.sina.com.cn (mail115-63.sinamail.sina.com.cn [218.30.115.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE042E573 for ; Fri, 24 Jan 2025 10:30:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.63 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737714630; cv=none; b=hEmvzWFuyjPj8tqmaVXeh0sk8yHzYREBfJEOXNb7SrQU5fTspvSs1fQCdrF+ZwsaUvtXVC51IKZ6m193qjzLetrNAJnTb08V4FC8G8p/e2jHotfr/ueEqfx0hxIiP4CDEYYrMBTz5X49hPpIUh9tjbaJBeHF+yefgu1t+ddHq8c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737714630; c=relaxed/simple; bh=FxpeujzI+JChiU2k2FySh55shIg0LCwVSYmz/1UivNU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Re6Oi+2t6iAeyrDniiaTx8Qy62qBIlt7YaC0p7EbRXnLIAzF/4oyw+6g6srhB/HRsFIz4UurnHmUi22WmttOCeM002hm/fMfU4mDSOO2VHU6CEnu7uS3/07zJotbs5coq5Cz9Aj1EoMP5PXp9sDn8RN8kMRL1EcQMYwS3tq97CI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.115.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.88.49.166]) by sina.com (10.185.250.22) with ESMTP id 67936BB700007D39; Fri, 24 Jan 2025 18:30:17 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 2394937602541 X-SMAIL-UIID: B557A84C3D734ED19C7C980762BD89F4-20250124-183017-1 From: Hillf Danton To: Sergey Senozhatsky Cc: Minchan Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/7] zram: switch to non-atomic entry locking Date: Fri, 24 Jan 2025 18:30:07 +0800 Message-ID: <20250124103009.1761-1-hdanton@sina.com> In-Reply-To: <20250122055831.3341175-2-senozhatsky@chromium.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On (25/01/22 14:57), Sergey Senozhatsky wrote: > > - for (index = 0; index < num_pages; index++) > - spin_lock_init(&zram->table[index].lock); > + for (index = 0; index < num_ents; index++) > + init_rwsem(&zram->locks[index].lock); Curious if lockdep trick [1] is needed here. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/fs/kernfs/file.c?id=16b52bbee482