Re: dm-crypt using kthread
From: Christophe Saout
Date: Sun Feb 15 2004 - 22:12:05 EST
Am Mo, den 16.02.2004 schrieb Jeff Garzik um 03:58:
> >>>+ if ((i - bio->bi_idx) == (MIN_BIO_PAGES - 1))
> >>>+ gfp_mask = (gfp_mask | __GFP_NOWARN) & ~__GFP_WAIT;
> >>
> >>If the caller said they can wait, why not wait?
> >
> > How can the caller say this?
>
> There is a gfp_mask there :)
I still don't get it. :(
The caller is the crypt_map function which is called by dm which is
called by generic_make_request. There are no gfp_masks there.
> This sounds like a lot of work, just to reimplement what a semaphore
> does for you :)
It sounds more complicated than it is...
In my very first version I used semaphores. I'm turning in circles. ;)
> There is typically one special case -- killing your thread on shutdown.
> The typical solution is to set a flag thread_shutdown, and then up().
I'm using the kthread primitives, kthread_stop kills the thread using a
signal.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/