mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: "Vamsi Krishna S ." <vamsi@in.ibm.com>
Cc: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk,
	marcelo@conectiva.com.br, dan@debian.org, tachino@jp.fujitsu.com,
	jefreyr@pacbell.net, mgross@unix-os.sc.intel.com,
	vamsi_krishna@in.ibm.com, richardj_moore@uk.ibm.com,
	hanharat@us.ibm.com, bsuparna@in.ibm.com, bharata@in.ibm.com,
	asit.k.mallick@intel.com, david.p.howell@intel.com,
	tony.luck@intel.com, sunil.saxena@intel.com
Subject: Re: [PATCH] multithreaded coredumps for elf exeecutables
Date: Tue, 19 Mar 2002 15:29:59 +0000	[thread overview]
Message-ID: <20020319152959.C55@toy.ucw.cz> (raw)
In-Reply-To: <20020315170726.A3405@in.ibm.com>

Hi!

> - Other threads are prevented from executing while core dump is in 
>   progress to improve the accuracy of the dumps. This is done without 
>   changing the state of the task. We set cpus_allowed in task struct 
>   to be 0 to stop a task from being scheduled and reset it to -1 for
>   resume execution. This has the advantage to not depending on user
>   space at all for correct functioning. IMO sending SIGSTOP to stop 
>   other threads does not work if the process is being run under a 
>   debugger. The only possible issue with using cpus_allowed is that 

In swsusp patch, I had exactly the same problem. I created refrigerator(),
and halfway send a signal.... 

> +/*
> + * Suspend execution of other threads belonging to the same multithreaded process 
> + * of current, ASAP.
> + *
> + * Sets the current->cpu_mask to the current cpu to avoid cpu migration durring the dump.
> + * This cpu will also be the only cpu the other threads will be allowed to run after 
> + * coredump is completed. This seems to be needed to fix some SMP races.  This still
> + * needs some more thought though this solution works.

What about

app has 5 threads. 1st dumps core, and starts setting cpus_allowed mask to
thread 2. Meanwhile 3nd thread resets the mask back.

								Pavel?

-- 
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.


  reply	other threads:[~2002-03-19 21:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-15 11:37 Vamsi Krishna S .
2002-03-19 15:29 ` Pavel Machek [this message]
2002-03-19 18:49   ` Mark Gross
2002-03-20  6:06     ` Vamsi Krishna S .
2002-03-20 18:37       ` Daniel Jacobowitz
2002-03-20 16:14         ` Mark Gross
2002-03-21 10:03           ` Vamsi Krishna S .
2002-03-22 16:19             ` Mark Gross
2002-03-21 10:16         ` Vamsi Krishna S .
2002-03-21 16:27           ` Daniel Jacobowitz
2002-03-21 16:52             ` Alan Cox
2002-03-21 14:10               ` Mark Gross
2002-03-21 17:34                 ` Alan Cox
2002-03-21 14:59                   ` Mark Gross
2002-03-21 20:25                 ` Pavel Machek
2002-03-22  6:06 Suparna Bhattacharya
2002-03-29  5:43 ` Jeff Jenkins
2002-03-29 12:50   ` Mark Gross

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=20020319152959.C55@toy.ucw.cz \
    --to=pavel@suse.cz \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=asit.k.mallick@intel.com \
    --cc=bharata@in.ibm.com \
    --cc=bsuparna@in.ibm.com \
    --cc=dan@debian.org \
    --cc=david.p.howell@intel.com \
    --cc=hanharat@us.ibm.com \
    --cc=jefreyr@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=mgross@unix-os.sc.intel.com \
    --cc=richardj_moore@uk.ibm.com \
    --cc=sunil.saxena@intel.com \
    --cc=tachino@jp.fujitsu.com \
    --cc=tony.luck@intel.com \
    --cc=vamsi@in.ibm.com \
    --cc=vamsi_krishna@in.ibm.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

all inboxes | Powered by JetHome®