[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150922202604.GG17659@mtj.duckdns.org>
Date: Tue, 22 Sep 2015 16:26:04 -0400
From: Tejun Heo <tj@...nel.org>
To: Petr Mladek <pmladek@...e.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Josh Triplett <josh@...htriplett.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>, Borislav Petkov <bp@...e.de>,
Michal Hocko <mhocko@...e.cz>, linux-mm@...ck.org,
Vlastimil Babka <vbabka@...e.cz>,
live-patching@...r.kernel.org, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC v2 09/18] mm/huge_page: Convert khugepaged() into kthread
worker API
Hello,
On Mon, Sep 21, 2015 at 03:03:50PM +0200, Petr Mladek wrote:
> +static int khugepaged_has_work(void)
> +{
> + return !list_empty(&khugepaged_scan.mm_head) &&
> + khugepaged_enabled();
> +}
Hmmm... no biggie but this is a bit bothering.
> @@ -425,7 +447,10 @@ static ssize_t scan_sleep_millisecs_store(struct kobject *kobj,
> return -EINVAL;
>
> khugepaged_scan_sleep_millisecs = msecs;
> - wake_up_interruptible(&khugepaged_wait);
> + if (khugepaged_has_work())
> + mod_delayed_kthread_work(khugepaged_worker,
> + &khugepaged_do_scan_work,
> + 0);
What's wrong with just doing the following?
if (khugepaged_enabled())
mod_delayed_kthread_work(...);
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists