linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Subject: Re: linux-next: manual merge of the tip tree with the block tree
Date: Mon, 21 Jun 2010 10:13:00 -0700	[thread overview]
Message-ID: <20100621171300.GF2354@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100621161623.3dfedc32.sfr@canb.auug.org.au>

On Mon, Jun 21, 2010 at 04:16:23PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the tip tree got a conflict in
> fs/fs-writeback.c between commits 7f0e7bed936a0c422641a046551829a01341dd80
> ("writeback: fix writeback completion notifications") and
> 3c4d716538f3eefb1c1f10961a047a6456a2b590 ("writeback: queue work on stack
> in writeback_inodes_sb") from the block tree and commit
> b97181f24212f4c29197890ce1b2b9100bcc184d ("fs: remove all rcu head
> initializations, except on_stack initializations") from the tip tree.
> 
> I fixed it up (I hope - see below) and can carry the fix as necessary.

I took a look, and all of the changes from "fs: remove all rcu head
initializations, except on_stack initializations" are reflected in -next.

							Thanx, Paul

> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --cc fs/fs-writeback.c
> index 5455009,af92100..0000000
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@@ -63,16 -63,45 +63,37 @@@ struct bdi_work 
>   };
>   
>   enum {
>  -	WS_USED_B = 0,
>  -	WS_ONSTACK_B,
>  +	WS_INPROGRESS = 0,
>  +	WS_ONSTACK,
>   };
>   
> - static inline void bdi_work_init(struct bdi_work *work,
> - 				 struct wb_writeback_args *args)
>  -#define WS_USED (1 << WS_USED_B)
>  -#define WS_ONSTACK (1 << WS_ONSTACK_B)
>  -
>  -static inline bool bdi_work_on_stack(struct bdi_work *work)
>  -{
>  -	return test_bit(WS_ONSTACK_B, &work->state);
>  -}
>  -
> + static inline void __bdi_work_init(struct bdi_work *work,
> + 				   struct wb_writeback_args *args,
> + 				   int on_stack)
>   {
> - 	INIT_RCU_HEAD(&work->rcu_head);
>   	work->args = *args;
>  -	work->state = WS_USED;
>  +	__set_bit(WS_INPROGRESS, &work->state);
> + 	if (on_stack) {
>  -		work->state |= WS_ONSTACK;
> ++		__set_bit(WS_ONSTACK, &work->state);
> + 		init_rcu_head_on_stack(&work->rcu_head);
> + 	}
> + }
> + 
> + static inline void bdi_work_init(struct bdi_work *work,
> + 				 struct wb_writeback_args *args)
> + {
> + 	__bdi_work_init(work, args, false);
> + }
> + 
> + static inline void bdi_work_init_on_stack(struct bdi_work *work,
> + 					  struct wb_writeback_args *args)
> + {
> + 	__bdi_work_init(work, args, true);
> + }
> + 
> + static inline void bdi_destroy_work_on_stack(struct bdi_work *work)
> + {
> + 	destroy_rcu_head_on_stack(&work->rcu_head);
>   }
>   
>   /**
> @@@ -182,19 -239,26 +203,19 @@@ static void bdi_alloc_queue_work(struc
>    * @sb: write inodes from this super_block
>    *
>    * Description:
>  - *   This does WB_SYNC_ALL data integrity writeback and waits for the
>  - *   IO to complete. Callers must hold the sb s_umount semaphore for
>  + *   This function initiates writeback and waits for the operation to
>  + *   complete. Callers must hold the sb s_umount semaphore for
>    *   reading, to avoid having the super disappear before we are done.
>    */
>  -static void bdi_sync_writeback(struct backing_dev_info *bdi,
>  -			       struct super_block *sb)
>  +static void bdi_queue_work_onstack(struct wb_writeback_args *args)
>   {
>  -	struct wb_writeback_args args = {
>  -		.sb		= sb,
>  -		.sync_mode	= WB_SYNC_ALL,
>  -		.nr_pages	= LONG_MAX,
>  -		.range_cyclic	= 0,
>  -	};
>   	struct bdi_work work;
>   
> - 	bdi_work_init(&work, args);
> - 	__set_bit(WS_ONSTACK, &work.state);
>  -	bdi_work_init_on_stack(&work, &args);
> ++	bdi_work_init_on_stack(&work, args);
>   
>  -	bdi_queue_work(bdi, &work);
>  -	bdi_wait_on_work_clear(&work);
>  +	bdi_queue_work(args->sb->s_bdi, &work);
>  +	bdi_wait_on_work_done(&work);
> + 	bdi_destroy_work_on_stack(&work);
>   }
>   
>   /**
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2010-06-21 17:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21  6:16 linux-next: manual merge of the tip tree with the block tree Stephen Rothwell
2010-06-21 17:13 ` Paul E. McKenney [this message]
2010-06-21 23:40   ` Stephen Rothwell
2010-06-22  0:04     ` Stephen Rothwell
2010-06-22  0:40       ` Paul E. McKenney
2010-06-22  6:26         ` Jens Axboe
2010-06-22 17:14           ` Paul E. McKenney
     [not found] <20100622143121.186fe9c4.sfr@canb.auug.org.au>
2010-06-22 21:06 ` Paul E. McKenney
  -- strict thread matches above, loose matches on Subject: below --
2014-05-09  4:46 Stephen Rothwell
2017-07-03  3:56 Stephen Rothwell
2017-07-03  4:03 ` Stephen Rothwell
2017-11-01  6:10 Stephen Rothwell
2017-11-01 14:25 ` Jens Axboe
2017-11-01 14:37   ` Kees Cook
2019-02-13  2:41 Stephen Rothwell
2020-11-09  3:14 Stephen Rothwell
2020-11-09 13:45 ` Thomas Gleixner
2020-11-09 14:06   ` Jens Axboe
     [not found] <1Vn5Pr0rEN5VNr1V-oUtQYs_wVms3VZ7jsttDqMtVv3XxoMEIBc7Yf3FJhEanCMsvJe9z8HjzX7cEMedSJX68A==@protonmail.internalid>
2025-09-15 22:25 ` Mark Brown
2025-09-16  0:28   ` Boqun Feng
2025-09-17  7:46   ` Andreas Hindborg

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=20100621171300.GF2354@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).