All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Christoph Hellwig <hch@caldera.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] kthread abstraction
Date: Fri, 01 Feb 2002 09:49:22 -0800	[thread overview]
Message-ID: <3C5AD522.1070808@us.ibm.com> (raw)
In-Reply-To: <20020201163818.A32551@caldera.de> <3C5ACE88.1050002@us.ibm.com> <20020201182354.A7740@caldera.de>

Christoph Hellwig wrote:
> On Fri, Feb 01, 2002 at 09:21:12AM -0800, Dave Hansen wrote:
>>Things like nfsd are always holding the BKL, only 
>>releasing it on schedule(), and exit.  Is there any compelling reason to 
>>hold the BKL during times other than during the daemonize() process?
>
> In general there is no reason.  If the data the thread accesses is not
> protected by anything but BKL it must hold it - else it seems superflous
> to me.
What do you think about the BKL hold during daemonize()?  Can we expand 
the use of the task lock to keep the BKL from being held?

/* these all use task_lock(): */
         exit_mm(current);
         exit_fs(current);
         exit_files(current);

/* Is there more locking needed for this? */
         current->session = 1;
         current->pgrp = 1;
         current->tty = NULL;
         fs = init_task.fs;
         current->fs = fs;

/* This is already safe: */
         atomic_inc(&fs->count);
         current->files = init_task.files;
         atomic_inc(&current->files->count);


-- 
Dave Hansen
haveblue@us.ibm.com


  reply	other threads:[~2002-02-01 17:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-01 15:38 [PATCH][RFC] kthread abstraction Christoph Hellwig
2002-02-01 16:32 ` Adam Keys
2002-02-01 16:40   ` Christoph Hellwig
2002-02-01 17:21 ` Dave Hansen
2002-02-01 17:23   ` Christoph Hellwig
2002-02-01 17:49     ` Dave Hansen [this message]
2002-02-01 17:50 ` Jeff Garzik
     [not found] <20020201163818.A32551@caldera.de.suse.lists.linux.kernel>
2002-02-01 16:50 ` Andi Kleen
2002-02-01 17:07   ` Christoph Hellwig
2002-02-01 17:17   ` Christoph Hellwig

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=3C5AD522.1070808@us.ibm.com \
    --to=haveblue@us.ibm.com \
    --cc=hch@caldera.de \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.