mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugo Lefeuvre <hle@owl.eu.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Greg Hartman" <ghartman@google.com>,
	"Alistair Strachan" <astrachan@google.com>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Martijn Coenen" <maco@android.com>,
	"Christian Brauner" <christian@brauner.io>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] sched/wait: use freezable_schedule when possible
Date: Thu, 7 Feb 2019 14:28:01 +0100	[thread overview]
Message-ID: <20190207132801.GA2284@behemoth.owl.eu.com.local> (raw)
In-Reply-To: <20190202183743.GA229953@google.com>

[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]

Hi,

> > The result is a potential performance gain during freeze, since less
> > tasks have to be awaken.
> 
> I'm curious did you try the freezing process and see if pointless wakeups are
> reduced?  That would be an added bonus if you did.

Test env: fresh Debian QEMU vm with 4.19 stable kernel.

Test process:

- Added two debug logs to freeze_task:

    bool freeze_task(struct task_struct *p)
    {
        unsigned long flags;
    [snip]
        pr_info("freezing a task");
    [snip]
        if (freezer_should_skip(p)) {
            pr_info("skeeping a task");
            return false;
        }
    [snip]
    }

- Triggered manual freeze:

# echo freezer > /sys/power/pm_test
# echo test_resume > /sys/power/disk
# echo disk > /sys/power/state

- grep -c to get the number of "freezing a task" and "skeeping a task"
lines in kern.log.

Results:

Without my patch: 448 calls freeze_task, 12 skipped.
With my patch: 448 calls, 32 skipped.

2.6x more tasks skipped.

Not sure this is the best way to test this patch, though. Any advice?

regards,
 Hugo

-- 
                Hugo Lefeuvre (hle)    |    www.owl.eu.com
RSA4096_ 360B 03B3 BF27 4F4D 7A3F D5E8 14AA 1EB8 A247 3DFD
ed25519_ 37B2 6D38 0B25 B8A2 6B9F 3A65 A36F 5357 5F2D DC4C

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2019-02-07 13:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01  5:37 [PATCH 0/3] sched/wait, staging/android: simplification and optimization of freeze related code Hugo Lefeuvre
2019-02-01  5:38 ` [PATCH 1/3] sched/wait: use freezable_schedule when possible Hugo Lefeuvre
2019-02-02 18:37   ` Joel Fernandes
2019-02-06 23:30     ` Hugo Lefeuvre
2019-02-07 15:05       ` Joel Fernandes
2019-02-07 21:40         ` Hugo Lefeuvre
2019-02-07 13:28     ` Hugo Lefeuvre [this message]
2019-02-05 16:37   ` Joel Fernandes
2019-02-01  5:38 ` [PATCH 2/3] sched/wait: introduce wait_event_freezable_hrtimeout Hugo Lefeuvre
2019-02-05 16:42   ` Joel Fernandes
2019-02-01  5:39 ` [PATCH 3/3] staging/android: simplify handle_vsoc_cond_wait Hugo Lefeuvre
2019-02-04 15:52   ` Joel Fernandes

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=20190207132801.GA2284@behemoth.owl.eu.com.local \
    --to=hle@owl.eu.com \
    --cc=arve@android.com \
    --cc=astrachan@google.com \
    --cc=christian@brauner.io \
    --cc=devel@driverdev.osuosl.org \
    --cc=ghartman@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tkjos@android.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

Powered by JetHome