[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z7YXHwN2LSSC5rVe@aschofie-mobl2.lan>
Date: Wed, 19 Feb 2025 09:38:39 -0800
From: Alison Schofield <alison.schofield@...el.com>
To: Li Ming <ming.li@...omail.com>
Cc: dave@...olabs.net, jonathan.cameron@...wei.com, dave.jiang@...el.com,
vishal.l.verma@...el.com, ira.weiny@...el.com,
dan.j.williams@...el.com, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 7/7] cxl/region: Drop goto pattern of
construct_region()
On Mon, Feb 17, 2025 at 10:48:28PM +0800, Li Ming wrote:
> Some operations need to be protected by the cxl_region_rwsem in
> construct_region(). Currently, construct_region() uses down_write() and
> up_write() for the cxl_region_rwsem locking, so there is a goto pattern
> after down_write() invoked to release cxl_region_rwsem.
>
> construct region() can be optimized to remove the goto pattern. The
> changes are creating a new function called construct_auto_region() which
> will include all checking and operations protected by the
> cxl_region_rwsem, and using guard(rwsem_write) to replace down_write()
> and up_write() in construct_auto_region().
>
> Signed-off-by: Li Ming <ming.li@...omail.com>
Reviewed-by: Alison Schofield <alison.schofield@...el.com>
snip
Powered by blists - more mailing lists