Linux Device Mapper development
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Joe Thornber <thornber@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	Philip Shilane <philip.shilane@emc.com>,
	Sonam Mandal <sonam.dp42@gmail.com>,
	Erez Zadok <ezk@fsl.cs.sunysb.edu>
Subject: Re: [PATCH RFCv2 03/10] dm-dedup: hash computation
Date: Fri, 6 Feb 2015 16:42:07 -0500	[thread overview]
Message-ID: <20150206214207.GA27130@redhat.com> (raw)
In-Reply-To: <53ffb650.0878320a.243a.133d@mx.google.com>

On Thu, Aug 28, 2014 at 06:04:55PM -0400, Vasily Tarasov wrote:

[..]
> +#include "dm-dedup-target.h"
> +#include "dm-dedup-hash.h"
> +#include <linux/atomic.h>
> +#include <linux/blk_types.h>
> +
> +/*
> + * We are declaring and initalizaing global hash_desc, because
> + * we need to do hash computation in endio function, and this
> + * function is called in softirq context. Hence we are not
> + * allowed to perform any operation on that path which can sleep.
> + * And tfm allocation in hash_desc, at one point, tries to take
> + * semaphore and hence tries to sleep. And because of this we get
> + * BUG, which complains "Scheduling while atomic". Hence to avoid
> + * this scenario, we moved the declaration and initialization out
> + * of critical path.
> + */

Hi,

Is this comment still valid? We calculate hash when bio is submitted
from the worker thread context. So where is the softirq context here?

do_work()
 process_bio()
  handle_write()
   compute_hash_bio()

This all is happening in worker worker thread context and not softirq
context?

Thanks
Vivek

      reply	other threads:[~2015-02-06 21:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 22:04 [PATCH RFCv2 03/10] dm-dedup: hash computation Vasily Tarasov
2015-02-06 21:42 ` Vivek Goyal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150206214207.GA27130@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=ezk@fsl.cs.sunysb.edu \
    --cc=hch@infradead.org \
    --cc=philip.shilane@emc.com \
    --cc=snitzer@redhat.com \
    --cc=sonam.dp42@gmail.com \
    --cc=thornber@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox