Permalink
Browse files

Merge remote-tracking branch 'tuxonice-kernel/tuxonice-3.4' into pf-3.4

  • Loading branch information...
2 parents ef8e2f7 + d5219a7 commit b8036c453d92efabbb2616f150533911f2a5e79d Oleksandr Natalenko committed Jul 7, 2012
@@ -263,7 +263,7 @@ static int mpc83xx_suspend_begin(suspend_state_t state)
static int agent_thread_fn(void *data)
{
- set_freezable();
+ set_freezable();
while (1) {
wait_event_interruptible(agent_wq, pci_pm_state >= 2);
@@ -841,7 +841,7 @@ static int ps3_probe_thread(void *data)
if (res)
goto fail_free_irq;
- set_freezable();
+ set_freezable();
/* Loop here processing the requested notification events. */
do {
View
@@ -747,7 +747,6 @@ void machine_restart(char *cmd)
{
machine_ops.restart(cmd);
}
-EXPORT_SYMBOL_GPL(machine_restart);
void machine_halt(void)
{
View
@@ -1349,6 +1349,7 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
*/
__flush_tlb_all();
}
+
EXPORT_SYMBOL_GPL(kernel_map_pages);
#ifdef CONFIG_HIBERNATION
View
@@ -44,8 +44,6 @@ DEFINE_IDA(blk_queue_ida);
int trap_non_toi_io;
EXPORT_SYMBOL_GPL(trap_non_toi_io);
-static int __make_request(struct request_queue *q, struct bio *bio);
-
/*
* For the allocated request tables
*/
View
@@ -153,7 +153,7 @@ static int power_saving_thread(void *data)
u64 last_jiffies = 0;
sched_setscheduler(current, SCHED_RR, &param);
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
int cpu;
@@ -276,7 +276,7 @@ int xen_blkif_schedule(void *arg)
struct xen_vbd *vbd = &blkif->vbd;
xen_blkif_get(blkif);
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
if (try_to_freeze())
View
@@ -7084,13 +7084,13 @@ void md_do_sync(struct mddev *mddev)
*
*/
- set_freezable();
+ set_freezable();
do {
mddev->curr_resync = 2;
try_again:
- try_to_freeze();
+ try_to_freeze();
if (kthread_should_stop())
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
@@ -7115,7 +7115,7 @@ void md_do_sync(struct mddev *mddev)
*/
continue;
- try_to_freeze();
+ try_to_freeze();
/* We need to wait 'interruptible' so as not to
* contribute to the load average, and not to
@@ -7237,7 +7237,7 @@ void md_do_sync(struct mddev *mddev)
|| kthread_should_stop());
}
- try_to_freeze();
+ try_to_freeze();
if (kthread_should_stop())
goto interrupted;
@@ -7282,7 +7282,7 @@ void md_do_sync(struct mddev *mddev)
last_mark = next;
}
- try_to_freeze();
+ try_to_freeze();
if (kthread_should_stop())
goto interrupted;
@@ -739,7 +739,7 @@ static int stir_transmit_thread(void *arg)
struct net_device *dev = stir->netdev;
struct sk_buff *skb;
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
#ifdef CONFIG_PM
View
@@ -271,7 +271,7 @@ static int uwbd(void *param)
struct uwb_event *evt;
int should_stop = 0;
- set_freezable();
+ set_freezable();
while (1) {
wait_event_interruptible_timeout(
rc->uwbd.wq,
View
@@ -976,7 +976,7 @@ int w1_process(void *data)
* time can be calculated in jiffies once.
*/
const unsigned long jtime = msecs_to_jiffies(w1_timeout * 1000);
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
if (dev->search_count) {
View
@@ -338,93 +338,6 @@ int thaw_bdev(struct block_device *bdev, struct super_block *sb)
}
EXPORT_SYMBOL(thaw_bdev);
-#ifdef CONFIG_FS_FREEZER_DEBUG
-#define FS_PRINTK(fmt, args...) printk(fmt, ## args)
-#else
-#define FS_PRINTK(fmt, args...)
-#endif
-
-/* #define DEBUG_FS_FREEZING */
-
-/**
- * freeze_filesystems - lock all filesystems and force them into a consistent
- * state
- * @which: What combination of fuse & non-fuse to freeze.
- */
-void freeze_filesystems(int which)
-{
- struct super_block *sb;
-
- lockdep_off();
-
- /*
- * Freeze in reverse order so filesystems dependant upon others are
- * frozen in the right order (eg. loopback on ext3).
- */
- list_for_each_entry_reverse(sb, &super_blocks, s_list) {
- FS_PRINTK(KERN_INFO "Considering %s.%s: (root %p, bdev %x)",
- sb->s_type->name ? sb->s_type->name : "?",
- sb->s_subtype ? sb->s_subtype : "", sb->s_root,
- sb->s_bdev ? sb->s_bdev->bd_dev : 0);
-
- if (sb->s_type->fs_flags & FS_IS_FUSE &&
- sb->s_frozen == SB_UNFROZEN &&
- which & FS_FREEZER_FUSE) {
- sb->s_frozen = SB_FREEZE_TRANS;
- sb->s_flags |= MS_FROZEN;
- FS_PRINTK("Fuse filesystem done.\n");
- continue;
- }
-
- if (!sb->s_root || !sb->s_bdev ||
- (sb->s_frozen == SB_FREEZE_TRANS) ||
- (sb->s_flags & MS_RDONLY) ||
- (sb->s_flags & MS_FROZEN) ||
- !(which & FS_FREEZER_NORMAL)) {
- FS_PRINTK(KERN_INFO "Nope.\n");
- continue;
- }
-
- FS_PRINTK(KERN_INFO "Freezing %x... ", sb->s_bdev->bd_dev);
- freeze_bdev(sb->s_bdev);
- sb->s_flags |= MS_FROZEN;
- FS_PRINTK(KERN_INFO "Done.\n");
- }
-
- lockdep_on();
-}
-
-/**
- * thaw_filesystems - unlock all filesystems
- * @which: What combination of fuse & non-fuse to thaw.
- */
-void thaw_filesystems(int which)
-{
- struct super_block *sb;
-
- lockdep_off();
-
- list_for_each_entry(sb, &super_blocks, s_list) {
- if (!(sb->s_flags & MS_FROZEN))
- continue;
-
- if (sb->s_type->fs_flags & FS_IS_FUSE) {
- if (!(which & FS_FREEZER_FUSE))
- continue;
-
- sb->s_frozen = SB_UNFROZEN;
- } else {
- if (!(which & FS_FREEZER_NORMAL))
- continue;
-
- thaw_bdev(sb->s_bdev, sb);
- }
- sb->s_flags &= ~MS_FROZEN;
- }
-
- lockdep_on();
-}
-
static int blkdev_writepage(struct page *page, struct writeback_control *wbc)
{
return block_write_full_page(page, blkdev_get_block, wbc);
View
@@ -300,7 +300,7 @@ static int worker_loop(void *arg)
INIT_LIST_HEAD(&head);
INIT_LIST_HEAD(&prio_head);
- set_freezable();
+ set_freezable();
do {
again:
View
@@ -1531,7 +1531,7 @@ static int cleaner_kthread(void *arg)
{
struct btrfs_root *root = arg;
- set_freezable();
+ set_freezable();
do {
vfs_check_frozen(root->fs_info->sb, SB_FREEZE_WRITE);
@@ -1564,7 +1564,7 @@ static int transaction_kthread(void *arg)
unsigned long delay;
bool cannot_commit;
- set_freezable();
+ set_freezable();
do {
cannot_commit = false;
View
@@ -2701,7 +2701,7 @@ static int ext4_lazyinit_thread(void *arg)
unsigned long next_wakeup, cur;
BUG_ON(NULL == eli);
- set_freezable();
+ set_freezable();
cont_thread:
while (true) {
View
@@ -856,7 +856,7 @@ int gfs2_logd(void *data)
DEFINE_WAIT(wait);
unsigned preflush;
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
View
@@ -1397,7 +1397,7 @@ int gfs2_quotad(void *data)
DEFINE_WAIT(wait);
int empty;
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
View
@@ -2337,7 +2337,7 @@ int jfsIOWait(void *arg)
{
struct lbuf *bp;
- set_freezable();
+ set_freezable();
do {
spin_lock_irq(&log_redrive_lock);
View
@@ -2752,7 +2752,7 @@ int jfs_lazycommit(void *arg)
unsigned long flags;
struct jfs_sb_info *sbi;
- set_freezable();
+ set_freezable();
do {
LAZY_LOCK(flags);
@@ -2938,7 +2938,7 @@ int jfs_sync(void *arg)
struct jfs_inode_info *jfs_ip;
tid_t tid;
- set_freezable();
+ set_freezable();
do {
/*
View
@@ -2435,7 +2435,7 @@ static int nilfs_segctor_thread(void *arg)
struct the_nilfs *nilfs = sci->sc_super->s_fs_info;
int timeout = 0;
- set_freezable();
+ set_freezable();
sci->sc_timer.data = (unsigned long)current;
sci->sc_timer.function = nilfs_construction_timeout;
View
@@ -544,7 +544,7 @@ xfsaild(
struct xfs_ail *ailp = data;
long tout = 0; /* milliseconds */
- set_freezable();
+ set_freezable();
while (!kthread_should_stop()) {
if (tout && tout <= 20)
View
@@ -342,7 +342,7 @@ int kthread_worker_fn(void *worker_ptr)
WARN_ON(worker->task);
worker->task = current;
- set_freezable();
+ set_freezable();
repeat:
set_current_state(TASK_INTERRUPTIBLE); /* mb paired w/ kthread_stop */
View
@@ -181,12 +181,13 @@ void thaw_processes(void)
if (pm_freezing)
atomic_dec(&system_freezing_cnt);
pm_freezing = false;
+ pm_nosig_freezing = false;
oom_killer_enable();
printk("Restarting tasks ... ");
- thaw_kernel_threads();
+ thaw_workqueues();
read_lock(&tasklist_lock);
do_each_thread(g, p) {
View
@@ -16,13 +16,12 @@
#include <linux/bootmem.h>
#include <linux/suspend.h>
#include <linux/fs.h>
-#include <linux/kmod.h>
#include <linux/module.h>
#include <asm/setup.h>
#include "tuxonice_pageflags.h"
#include "power.h"
-#define TOI_CORE_VERSION "3.2.1"
+#define TOI_CORE_VERSION "3.3"
#define TOI_HEADER_VERSION 3
#define MY_BOOT_KERNEL_DATA_VERSION 3
@@ -997,7 +997,7 @@ static void eat_memory(void)
thaw_kernel_threads();
/*
- * Ask for too many because shrink_all_memory doesn't
+ * Ask for too many because shrink_memory_mask doesn't
* currently return enough most of the time.
*/
@@ -1012,7 +1012,7 @@ static void eat_memory(void)
amount_wanted = amount_needed(1);
- printk(KERN_DEBUG "Asked shrink_all_memory for %ld low pages &"
+ printk(KERN_DEBUG "Asked shrink_memory_mask for %ld low pages &"
" %ld pages from anywhere, got %ld.\n",
high_req, low_req,
request - amount_wanted);
@@ -178,7 +178,7 @@ void toi_early_boot_message(int message_detail, int default_answer,
post_ask:
if ((warning_reason) && (!continue_req))
- machine_restart(NULL);
+ kernel_restart(NULL);
restore_toi_state(orig_state);
if (continue_req)
@@ -29,7 +29,6 @@
#include <linux/tty.h>
#include <linux/vt_kern.h>
#include <linux/reboot.h>
-#include <linux/kmod.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/vt.h>
Oops, something went wrong.

0 comments on commit b8036c4

Please sign in to comment.