linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Anchal Agarwal <anchalag@amazon.com>,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	hpa@zytor.com, x86@kernel.org, boris.ostrovsky@oracle.com,
	jgross@suse.com, linux-pm@vger.kernel.org, linux-mm@kvack.org,
	kamatam@amazon.com, sstabellini@kernel.org,
	konrad.wilk@oracle.com, roger.pau@citrix.com, axboe@kernel.dk,
	davem@davemloft.net, rjw@rjwysocki.net, len.brown@intel.com,
	pavel@ucw.cz, peterz@infradead.org, eduval@amazon.com,
	sblbir@amazon.com, xen-devel@lists.xenproject.org,
	vkuznets@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, dwmw@amazon.co.uk,
	benh@kernel.crashing.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH 06/12] xen-blkfront: add callbacks for PM suspend and hibernation
Date: Wed, 20 May 2020 13:00:01 +0800	[thread overview]
Message-ID: <202005201221.3QB506km%lkp@intel.com> (raw)
In-Reply-To: <ad580b4d5b76c18fe2fe409704f25622e01af361.1589926004.git.anchalag@amazon.com>

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

Hi Anchal,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.7-rc6]
[cannot apply to xen-tip/linux-next tip/irq/core tip/auto-latest next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Anchal-Agarwal/Fix-PM-hibernation-in-Xen-guests/20200520-073211
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 03fb3acae4be8a6b680ffedb220a8b6c07260b40
config: x86_64-randconfig-a016-20200519 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/block/xen-blkfront.c:2699:30: warning: missing terminating '"' character [-Winvalid-pp-token]
xenbus_dev_error(dev, err, "Hibernation Failed.
^
>> drivers/block/xen-blkfront.c:2699:30: error: expected expression
drivers/block/xen-blkfront.c:2700:26: warning: missing terminating '"' character [-Winvalid-pp-token]
The ring is still busy");
^
>> drivers/block/xen-blkfront.c:2726:1: error: function definition is not allowed here
{
^
>> drivers/block/xen-blkfront.c:2762:10: error: use of undeclared identifier 'blkfront_restore'
.thaw = blkfront_restore,
^
drivers/block/xen-blkfront.c:2763:13: error: use of undeclared identifier 'blkfront_restore'
.restore = blkfront_restore
^
drivers/block/xen-blkfront.c:2767:1: error: function definition is not allowed here
{
^
drivers/block/xen-blkfront.c:2800:1: error: function definition is not allowed here
{
^
drivers/block/xen-blkfront.c:2822:1: error: function definition is not allowed here
{
^
>> drivers/block/xen-blkfront.c:2863:13: error: use of undeclared identifier 'xlblk_init'
module_init(xlblk_init);
^
drivers/block/xen-blkfront.c:2867:1: error: function definition is not allowed here
{
^
>> drivers/block/xen-blkfront.c:2874:13: error: use of undeclared identifier 'xlblk_exit'
module_exit(xlblk_exit);
^
>> drivers/block/xen-blkfront.c:2880:24: error: expected '}'
MODULE_ALIAS("xenblk");
^
drivers/block/xen-blkfront.c:2674:1: note: to match this '{'
{
^
>> drivers/block/xen-blkfront.c:2738:45: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
static const struct block_device_operations xlvbd_block_fops =
^
3 warnings and 11 errors generated.

vim +2699 drivers/block/xen-blkfront.c

  2672	
  2673	static int blkfront_freeze(struct xenbus_device *dev)
  2674	{
  2675		unsigned int i;
  2676		struct blkfront_info *info = dev_get_drvdata(&dev->dev);
  2677		struct blkfront_ring_info *rinfo;
  2678		/* This would be reasonable timeout as used in xenbus_dev_shutdown() */
  2679		unsigned int timeout = 5 * HZ;
  2680		unsigned long flags;
  2681		int err = 0;
  2682	
  2683		info->connected = BLKIF_STATE_FREEZING;
  2684	
  2685		blk_mq_freeze_queue(info->rq);
  2686		blk_mq_quiesce_queue(info->rq);
  2687	
  2688		for_each_rinfo(info, rinfo, i) {
  2689		    /* No more gnttab callback work. */
  2690		    gnttab_cancel_free_callback(&rinfo->callback);
  2691		    /* Flush gnttab callback work. Must be done with no locks held. */
  2692		    flush_work(&rinfo->work);
  2693		}
  2694	
  2695		for_each_rinfo(info, rinfo, i) {
  2696		    spin_lock_irqsave(&rinfo->ring_lock, flags);
  2697		    if (RING_FULL(&rinfo->ring)
  2698			    || RING_HAS_UNCONSUMED_RESPONSES(&rinfo->ring)) {
> 2699			xenbus_dev_error(dev, err, "Hibernation Failed.
  2700				The ring is still busy");
  2701			info->connected = BLKIF_STATE_CONNECTED;
  2702			spin_unlock_irqrestore(&rinfo->ring_lock, flags);
  2703			return -EBUSY;
  2704		}
  2705		    spin_unlock_irqrestore(&rinfo->ring_lock, flags);
  2706		}
  2707		/* Kick the backend to disconnect */
  2708		xenbus_switch_state(dev, XenbusStateClosing);
  2709	
  2710		/*
  2711		 * We don't want to move forward before the frontend is diconnected
  2712		 * from the backend cleanly.
  2713		 */
  2714		timeout = wait_for_completion_timeout(&info->wait_backend_disconnected,
  2715						      timeout);
  2716		if (!timeout) {
  2717			err = -EBUSY;
  2718			xenbus_dev_error(dev, err, "Freezing timed out;"
  2719					 "the device may become inconsistent state");
  2720		}
  2721	
  2722		return err;
  2723	}
  2724	
  2725	static int blkfront_restore(struct xenbus_device *dev)
> 2726	{
  2727		struct blkfront_info *info = dev_get_drvdata(&dev->dev);
  2728		int err = 0;
  2729	
  2730		err = talk_to_blkback(dev, info);
  2731		blk_mq_unquiesce_queue(info->rq);
  2732		blk_mq_unfreeze_queue(info->rq);
  2733		if (!err)
  2734		    blk_mq_update_nr_hw_queues(&info->tag_set, info->nr_rings);
  2735		return err;
  2736	}
  2737	
> 2738	static const struct block_device_operations xlvbd_block_fops =
  2739	{
  2740		.owner = THIS_MODULE,
  2741		.open = blkif_open,
  2742		.release = blkif_release,
  2743		.getgeo = blkif_getgeo,
  2744		.ioctl = blkif_ioctl,
  2745		.compat_ioctl = blkdev_compat_ptr_ioctl,
  2746	};
  2747	
  2748	
  2749	static const struct xenbus_device_id blkfront_ids[] = {
  2750		{ "vbd" },
  2751		{ "" }
  2752	};
  2753	
  2754	static struct xenbus_driver blkfront_driver = {
  2755		.ids  = blkfront_ids,
  2756		.probe = blkfront_probe,
  2757		.remove = blkfront_remove,
  2758		.resume = blkfront_resume,
  2759		.otherend_changed = blkback_changed,
  2760		.is_ready = blkfront_is_ready,
  2761		.freeze = blkfront_freeze,
> 2762		.thaw = blkfront_restore,
  2763		.restore = blkfront_restore
  2764	};
  2765	
  2766	static void purge_persistent_grants(struct blkfront_info *info)
> 2767	{
  2768		unsigned int i;
  2769		unsigned long flags;
  2770		struct blkfront_ring_info *rinfo;
  2771	
  2772		for_each_rinfo(info, rinfo, i) {
  2773			struct grant *gnt_list_entry, *tmp;
  2774	
  2775			spin_lock_irqsave(&rinfo->ring_lock, flags);
  2776	
  2777			if (rinfo->persistent_gnts_c == 0) {
  2778				spin_unlock_irqrestore(&rinfo->ring_lock, flags);
  2779				continue;
  2780			}
  2781	
  2782			list_for_each_entry_safe(gnt_list_entry, tmp, &rinfo->grants,
  2783						 node) {
  2784				if (gnt_list_entry->gref == GRANT_INVALID_REF ||
  2785				    gnttab_query_foreign_access(gnt_list_entry->gref))
  2786					continue;
  2787	
  2788				list_del(&gnt_list_entry->node);
  2789				gnttab_end_foreign_access(gnt_list_entry->gref, 0, 0UL);
  2790				rinfo->persistent_gnts_c--;
  2791				gnt_list_entry->gref = GRANT_INVALID_REF;
  2792				list_add_tail(&gnt_list_entry->node, &rinfo->grants);
  2793			}
  2794	
  2795			spin_unlock_irqrestore(&rinfo->ring_lock, flags);
  2796		}
  2797	}
  2798	
  2799	static void blkfront_delay_work(struct work_struct *work)
  2800	{
  2801		struct blkfront_info *info;
  2802		bool need_schedule_work = false;
  2803	
  2804		mutex_lock(&blkfront_mutex);
  2805	
  2806		list_for_each_entry(info, &info_list, info_list) {
  2807			if (info->feature_persistent) {
  2808				need_schedule_work = true;
  2809				mutex_lock(&info->mutex);
  2810				purge_persistent_grants(info);
  2811				mutex_unlock(&info->mutex);
  2812			}
  2813		}
  2814	
  2815		if (need_schedule_work)
  2816			schedule_delayed_work(&blkfront_work, HZ * 10);
  2817	
  2818		mutex_unlock(&blkfront_mutex);
  2819	}
  2820	
  2821	static int __init xlblk_init(void)
> 2822	{
  2823		int ret;
  2824		int nr_cpus = num_online_cpus();
  2825	
  2826		if (!xen_domain())
  2827			return -ENODEV;
  2828	
  2829		if (!xen_has_pv_disk_devices())
  2830			return -ENODEV;
  2831	
  2832		if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) {
  2833			pr_warn("xen_blk: can't get major %d with name %s\n",
  2834				XENVBD_MAJOR, DEV_NAME);
  2835			return -ENODEV;
  2836		}
  2837	
  2838		if (xen_blkif_max_segments < BLKIF_MAX_SEGMENTS_PER_REQUEST)
  2839			xen_blkif_max_segments = BLKIF_MAX_SEGMENTS_PER_REQUEST;
  2840	
  2841		if (xen_blkif_max_ring_order > XENBUS_MAX_RING_GRANT_ORDER) {
  2842			pr_info("Invalid max_ring_order (%d), will use default max: %d.\n",
  2843				xen_blkif_max_ring_order, XENBUS_MAX_RING_GRANT_ORDER);
  2844			xen_blkif_max_ring_order = XENBUS_MAX_RING_GRANT_ORDER;
  2845		}
  2846	
  2847		if (xen_blkif_max_queues > nr_cpus) {
  2848			pr_info("Invalid max_queues (%d), will use default max: %d.\n",
  2849				xen_blkif_max_queues, nr_cpus);
  2850			xen_blkif_max_queues = nr_cpus;
  2851		}
  2852	
  2853		INIT_DELAYED_WORK(&blkfront_work, blkfront_delay_work);
  2854	
  2855		ret = xenbus_register_frontend(&blkfront_driver);
  2856		if (ret) {
  2857			unregister_blkdev(XENVBD_MAJOR, DEV_NAME);
  2858			return ret;
  2859		}
  2860	
  2861		return 0;
  2862	}
> 2863	module_init(xlblk_init);
  2864	
  2865	
  2866	static void __exit xlblk_exit(void)
  2867	{
  2868		cancel_delayed_work_sync(&blkfront_work);
  2869	
  2870		xenbus_unregister_driver(&blkfront_driver);
  2871		unregister_blkdev(XENVBD_MAJOR, DEV_NAME);
  2872		kfree(minors);
  2873	}
> 2874	module_exit(xlblk_exit);
  2875	
  2876	MODULE_DESCRIPTION("Xen virtual block device frontend");
  2877	MODULE_LICENSE("GPL");
  2878	MODULE_ALIAS_BLOCKDEV_MAJOR(XENVBD_MAJOR);
  2879	MODULE_ALIAS("xen:vbd");
> 2880	MODULE_ALIAS("xenblk");

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40415 bytes --]

  reply	other threads:[~2020-05-20  5:00 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 23:24 [PATCH 00/12] Fix PM hibernation in Xen guests Anchal Agarwal
2020-05-19 23:24 ` [PATCH 01/12] xen/manage: keep track of the on-going suspend mode Anchal Agarwal
2020-05-30 22:26   ` Boris Ostrovsky
2020-06-01 21:00     ` Agarwal, Anchal
2020-06-01 22:39       ` Boris Ostrovsky
2020-05-19 23:25 ` [PATCH 02/12] xenbus: add freeze/thaw/restore callbacks support Anchal Agarwal
2020-05-30 22:56   ` Boris Ostrovsky
2020-06-01 23:36     ` Agarwal, Anchal
2020-05-19 23:25 ` [PATCH 03/12] x86/xen: Introduce new function to map HYPERVISOR_shared_info on Resume Anchal Agarwal
2020-05-30 23:02   ` Boris Ostrovsky
2020-06-04 23:03     ` Anchal Agarwal
2020-06-05 21:39       ` Boris Ostrovsky
2020-06-08 16:52         ` Anchal Agarwal
2020-06-08 18:49           ` Boris Ostrovsky
2020-05-19 23:26 ` [PATCH 04/12] x86/xen: add system core suspend and resume callbacks Anchal Agarwal
2020-05-30 23:10   ` Boris Ostrovsky
2020-06-03 22:40     ` Agarwal, Anchal
2020-06-05 21:24       ` Boris Ostrovsky
2020-06-08 17:09         ` Anchal Agarwal
2020-05-19 23:26 ` [PATCH 05/12] genirq: Shutdown irq chips in suspend/resume during hibernation Anchal Agarwal
2020-05-19 23:29   ` Singh, Balbir
2020-05-19 23:36     ` Agarwal, Anchal
2020-05-19 23:34   ` Anchal Agarwal
2020-05-30 23:17   ` Boris Ostrovsky
2020-06-01 20:46     ` Agarwal, Anchal
2020-05-19 23:27 ` [PATCH 06/12] xen-blkfront: add callbacks for PM suspend and hibernation Anchal Agarwal
2020-05-20  5:00   ` kbuild test robot [this message]
2020-05-20  5:07   ` kbuild test robot
2020-05-21 23:48   ` Anchal Agarwal
2020-05-22  1:43     ` Singh, Balbir
2020-05-23 12:32   ` kbuild test robot
2020-05-28 12:30   ` Roger Pau Monné
2020-05-19 23:28 ` [PATCH 07/12] xen-netfront: " Anchal Agarwal
2020-05-19 23:28 ` [PATCH 08/12] xen/time: introduce xen_{save,restore}_steal_clock Anchal Agarwal
2020-05-30 23:32   ` Boris Ostrovsky
2020-05-19 23:28 ` [PATCH 09/12] x86/xen: save and restore steal clock Anchal Agarwal
2020-05-30 23:44   ` Boris Ostrovsky
2020-06-04 18:33     ` Anchal Agarwal
2020-05-19 23:29 ` [PATCH 10/12] xen: Introduce wrapper for save/restore sched clock offset Anchal Agarwal
2020-05-19 23:29 ` [PATCH 11/12] xen: Update sched clock offset to avoid system instability in hibernation Anchal Agarwal
2020-05-19 23:29 ` [PATCH 12/12] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA Anchal Agarwal
2020-05-28 17:59 ` [PATCH 00/12] Fix PM hibernation in Xen guests Agarwal, Anchal

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=202005201221.3QB506km%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anchalag@amazon.com \
    --cc=axboe@kernel.dk \
    --cc=benh@kernel.crashing.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=dwmw@amazon.co.uk \
    --cc=eduval@amazon.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=kamatam@amazon.com \
    --cc=kbuild-all@lists.01.org \
    --cc=konrad.wilk@oracle.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=roger.pau@citrix.com \
    --cc=sblbir@amazon.com \
    --cc=sstabellini@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).