Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2402423imu; Fri, 23 Nov 2018 08:40:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/VombYVVKO/+MFlNsLv695rAYJRhujtAg5qWMwu+5A9FGS+cv9UiAfawxEmexjPcC92Azi3 X-Received: by 2002:a17:902:724a:: with SMTP id c10mr290419pll.51.1542991232986; Fri, 23 Nov 2018 08:40:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542991232; cv=none; d=google.com; s=arc-20160816; b=gbADi4a3V4ub4WAdX3m6vxvrQeiaTo9y+qFp+MMfmtdG6n78NdsTpovJ9NdRsTQRbW qvM9en1/MpB2PtXkUQoH7CJyNzsYMGFxt2alxFW9F/lwGN/o1KStlMO1YWCwHAL7eH3m 1SoOKhLYjqgNRdkeUxU55o6OvSdUpsCAA9OqAWv1zaEMseJA05ORPtoNG9Eul6P4sSo7 uuafFMYfZOYFafZ8TAGopMtvOTRavd1kUuN2rOgrmFKi0s1c1m/3rGQ4XC37Mh5+DOyp V3btL+db64zIgEtzYY0kuj9GXjNIO0PVInjsoiaMbp3UujjV0MJTn/zehFWaqu2ast4I U36g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=w/A/XZd6giUh65NMWZrZDosv/Wk8iVR0WF0zbSrPO08=; b=CeCLCHy8PjJZstOzKjqfFHYVkuJtvJ5t0G/pCTxKCuykduRRsgBpzCpmfh00uQfCFz Rc96xjAcCCI/GNRthZP3egEl5+3xJFXiTK+CrqsILEAalDa1FJpsJamjLfq13VDDEXVY Qutdv1e2ZItfMvuEqNWVs03bGzBIhMgNjxHTfx1+E6jQkJDb++qqVYVPcUmYKK0l5S0q giGcDesTXfw9cASUvte9OFfsfpS+OeLQh+yVQLnDtixvfPqrIEcu5pTqi15o/e9oJFzf FIW+rxmEE3j3TO/0mHCAmnWzkhpk4goAZeCVHYyV/veRDVe8Tmt4GPQUaQPNudc/4FRS 6yEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="CxF/QzmS"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g124si20206872pgc.568.2018.11.23.08.40.17; Fri, 23 Nov 2018 08:40:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="CxF/QzmS"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436602AbeKWAAD (ORCPT + 99 others); Thu, 22 Nov 2018 19:00:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:44372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729195AbeKWAAC (ORCPT ); Thu, 22 Nov 2018 19:00:02 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3629E20684; Thu, 22 Nov 2018 13:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542892843; bh=aGroXbhvpIWVabPHAhJEsC6o5J2bGv1s5u4svYZ7W3Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CxF/QzmS9aHflJJ6rnjP8qOC+BL4rqpZzV1dnTRf9I4S/eN0FGRUjAgPazRvDrTfU 8nJbFWCPEjSGFhpXp9NBq3x2AgdlWKHel/pv3CjKQlD818aiTT9f1Q2U65J99X9NrA /+kbgWoi+ruYxwEpyghFYiUSqpbTbNrR1gpS4fXw= Date: Thu, 22 Nov 2018 14:20:41 +0100 From: Greg Kroah-Hartman To: Gao Xiang Cc: devel@driverdev.osuosl.org, linux-erofs@lists.ozlabs.org, Chao Yu , LKML , weidu.du@huawei.com, Miao Xie Subject: Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled Message-ID: <20181122132041.GA14300@kroah.com> References: <20181120143425.43637-1-gaoxiang25@huawei.com> <20181120143425.43637-3-gaoxiang25@huawei.com> <20181122101711.GA3189@kroah.com> <55aed87f-196e-9048-6aae-db09bc497664@huawei.com> <20181122110642.GE5287@kroah.com> <78f8bed5-5f7f-8ca6-5d7a-3a94a2062425@huawei.com> <20181122122627.GC10212@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 22, 2018 at 08:41:15PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 20:26, Greg Kroah-Hartman wrote: > > Ugh, every page? Ok, nevermind, I take back my objections. You all are > > crazy and need to do crazy things like this :) > > ...Do you have some idea about this? ... I think it is fairly normal... :( > > We have a large number of managed workgroups, the current use case is the 4k compressed size, > each compressed page has a workgroup, but erofs also has reclaim paths to free them for low memory cases. > > But since the structure (z_erofs_vle_workgroup, erofs_workgroup) is critical, > I need to make it as small as possible. I do not know "real" filesystems (i.e. ones that put stuff on disks), only virtual ones (like sysfs/kernfs), so I do not know what to suggest here, sorry. I thought this was a much higner-level structure, if this is per-compressed-page, then you are more than welcome to optimize for this. Good luck with your "fake" spinlocks though :) thanks, greg k-h