linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lightnvm: pblk: add comments wrt locking in recovery path
@ 2018-11-28 11:20 Javier González
  2018-11-30  8:36 ` Matias Bjørling
  0 siblings, 1 reply; 2+ messages in thread
From: Javier González @ 2018-11-28 11:20 UTC (permalink / raw)
  To: mb; +Cc: linux-block, linux-kernel, Javier González

pblk's recovery path is single threaded and therefore a number of
assumptions regarding concurrency can be made. To avoid confusion, make
this explicit with a couple of comments in the code.

Signed-off-by: Javier González <javier@cnexlabs.com>
---
 drivers/lightnvm/pblk-core.c     | 1 +
 drivers/lightnvm/pblk-recovery.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index 44c5dc046912..f1b411e7c7c9 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -1276,6 +1276,7 @@ static int pblk_line_prepare(struct pblk *pblk, struct pblk_line *line)
 	return 0;
 }
 
+/* Line allocations in the recovery path are always single threaded */
 int pblk_line_recov_alloc(struct pblk *pblk, struct pblk_line *line)
 {
 	struct pblk_line_mgmt *l_mg = &pblk->l_mg;
diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c
index 416d9840544b..4c726506a831 100644
--- a/drivers/lightnvm/pblk-recovery.c
+++ b/drivers/lightnvm/pblk-recovery.c
@@ -13,6 +13,9 @@
  * General Public License for more details.
  *
  * pblk-recovery.c - pblk's recovery path
+ *
+ * The L2P recovery path is single threaded as the L2P table is updated in order
+ * following the line sequence ID.
  */
 
 #include "pblk.h"
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lightnvm: pblk: add comments wrt locking in recovery path
  2018-11-28 11:20 [PATCH] lightnvm: pblk: add comments wrt locking in recovery path Javier González
@ 2018-11-30  8:36 ` Matias Bjørling
  0 siblings, 0 replies; 2+ messages in thread
From: Matias Bjørling @ 2018-11-30  8:36 UTC (permalink / raw)
  To: Javier González; +Cc: linux-block, linux-kernel, Javier González

On 11/28/2018 12:20 PM, Javier González wrote:
> pblk's recovery path is single threaded and therefore a number of
> assumptions regarding concurrency can be made. To avoid confusion, make
> this explicit with a couple of comments in the code.
> 
> Signed-off-by: Javier González <javier@cnexlabs.com>
> ---
>   drivers/lightnvm/pblk-core.c     | 1 +
>   drivers/lightnvm/pblk-recovery.c | 3 +++
>   2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
> index 44c5dc046912..f1b411e7c7c9 100644
> --- a/drivers/lightnvm/pblk-core.c
> +++ b/drivers/lightnvm/pblk-core.c
> @@ -1276,6 +1276,7 @@ static int pblk_line_prepare(struct pblk *pblk, struct pblk_line *line)
>   	return 0;
>   }
>   
> +/* Line allocations in the recovery path are always single threaded */
>   int pblk_line_recov_alloc(struct pblk *pblk, struct pblk_line *line)
>   {
>   	struct pblk_line_mgmt *l_mg = &pblk->l_mg;
> diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c
> index 416d9840544b..4c726506a831 100644
> --- a/drivers/lightnvm/pblk-recovery.c
> +++ b/drivers/lightnvm/pblk-recovery.c
> @@ -13,6 +13,9 @@
>    * General Public License for more details.
>    *
>    * pblk-recovery.c - pblk's recovery path
> + *
> + * The L2P recovery path is single threaded as the L2P table is updated in order
> + * following the line sequence ID.
>    */
>   
>   #include "pblk.h"
> 

Picked up for 4.21.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-30  8:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-28 11:20 [PATCH] lightnvm: pblk: add comments wrt locking in recovery path Javier González
2018-11-30  8:36 ` Matias Bjørling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).