lkml.org 
[lkml]   [2004]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: dm-crypt using kthread
From
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.242 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site