Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1957684imu; Fri, 23 Nov 2018 02:42:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/XXOEorW+bc4BpLwrkLoPOEpwZ++iTjFJHEFB0Tvoalk+mftWWaia7waOfz/MDOJb1n+o87 X-Received: by 2002:a17:902:8bca:: with SMTP id r10-v6mr14738217plo.199.1542969728150; Fri, 23 Nov 2018 02:42:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542969728; cv=none; d=google.com; s=arc-20160816; b=fzk2KtlLyqfQWOows7/HthUzDiuIFVBhV6FDO8wI76IzoF4XSmy8fp3tHmHq3O0EKG eKNmH3tn2Ifw2b6sNB4kAhuiiWikVcPWa3ZmB8izIa3cJ7NrXwKfE5oZaYTX/sxKW7Qm sAElqUtGLFl9ksLkMKKtBHzhAqaH4MndTSf8RgEoEECk9PPH3INBatrlaOHlQHh96Vrj IirQRmUTen3dAfL+YkOKIhJmQU0peLkjei9RL3LmXbdyDC3acNTHUAg8d3Og3C2UldB/ 36Nwyhz9UU135NefQpR78qbIDwB898/tDQoKdBl2aVRQr7N6gIISZeTyNMRty2R+TzxS 9V4A== 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=isfjFY9jpo6LR1U+1jpk1jY0Vs9l33d7h3kCe2uq224=; b=hceKfDKb6uPhxcQot/K6Eqg/QnVrHhMeXsEPsOyf7ky3Etsz8b5BCa8efsaD5hd0SC xQhvchlScb/sooRzer28kTuj2do9blkt/6y4na4OQPGe9pU/M0xx4gqSCeyDpQRqUIiX nDCFXgCx5HgNnOVCFaXe0waNDGVsNMNSdhmTHaXlpVLaEzdaOPs8tmYHLs/TMqFwZlID T+EvA03XSnkJbvY+nk0IJHb19AQWT2U8RQq4n/vxwoMklzyYaOzsRw4WgOv5NT+dnDbJ ZNmALGsdO68OuDxVTDSGsDF7Kvy7StdPu8zYQYx27OTCJYBeuivr2hy5KTIPQ5vbEKMW AJ7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ANkwKq3D; 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 w7-v6si53301411pgh.131.2018.11.23.02.41.53; Fri, 23 Nov 2018 02:42:08 -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=ANkwKq3D; 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 S2405278AbeKVVAr (ORCPT + 99 others); Thu, 22 Nov 2018 16:00:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:54898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731554AbeKVVAq (ORCPT ); Thu, 22 Nov 2018 16:00:46 -0500 Received: from localhost (unknown [95.99.132.93]) (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 12CC620684; Thu, 22 Nov 2018 10:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542882118; bh=ZF1UiHbVfoauqPUc1Gtjs0M13r9ab07jaMuqyfiYK6U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ANkwKq3DJnZDQ7GrKTm/3K392CZF23y/wW0juWjd//ZV0xSnjt21rvK4Cw2I08513 kgFK+QSNZCdN1G4TcyQyz5ic1Y3yKoFS/83uJy/fwDSPx87Nwp3+3lgOT7EOrNyZcp MP4LJCiGnw7B7xtzMKpwyG3VMib4/UtwHS3RXmag= Date: Thu, 22 Nov 2018 11:21:55 +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 04/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}' Message-ID: <20181122102155.GE3189@kroah.com> References: <20181120143425.43637-1-gaoxiang25@huawei.com> <20181120143425.43637-5-gaoxiang25@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181120143425.43637-5-gaoxiang25@huawei.com> 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 Tue, Nov 20, 2018 at 10:34:19PM +0800, Gao Xiang wrote: > There are two minor issues in the current freeze interface: > > 1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK, > therefore fix the incorrect conditions; > > 2) For SMP platforms, it should also disable preemption before > doing atomic_cmpxchg in case that some high priority tasks > preempt between atomic_cmpxchg and disable_preempt, then spin > on the locked refcount later. spinning on a refcount implies that you are trying to do your own type of locking. Why not use the in-kernel locking api instead? It will always do better than trying to do your own logic as the developers there know locking across all types of cpus better than filesystem developers :) thanks, greg k-h