Displaying 20 results from an estimated 370 matches for "notifier_call".
2012 Dec 26
5
[RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug
...*nfb,
+ unsigned long action, void *hcpu)
+{
+ switch(action) {
+ case CPU_ONLINE:
+ case CPU_ONLINE_FROZEN:
+ case CPU_DEAD:
+ case CPU_DEAD_FROZEN:
+ cpu_hotplug = true;
+ break;
+ default:
+ break;
+ }
+ return NOTIFY_OK;
+}
+
+static struct notifier_block virtnet_cpu_notifier = {
+ .notifier_call = virtnet_cpu_callback,
+};
+
static void virtnet_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring)
{
@@ -1131,7 +1154,14 @@ static int virtnet_change_mtu(struct net_device *dev, int new_mtu)
*/
static u16 virtnet_select_queue(struct net_device *dev, struct sk_buff *sk...
2012 Dec 26
5
[RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug
...*nfb,
+ unsigned long action, void *hcpu)
+{
+ switch(action) {
+ case CPU_ONLINE:
+ case CPU_ONLINE_FROZEN:
+ case CPU_DEAD:
+ case CPU_DEAD_FROZEN:
+ cpu_hotplug = true;
+ break;
+ default:
+ break;
+ }
+ return NOTIFY_OK;
+}
+
+static struct notifier_block virtnet_cpu_notifier = {
+ .notifier_call = virtnet_cpu_callback,
+};
+
static void virtnet_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *ring)
{
@@ -1131,7 +1154,14 @@ static int virtnet_change_mtu(struct net_device *dev, int new_mtu)
*/
static u16 virtnet_select_queue(struct net_device *dev, struct sk_buff *sk...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...are
>> + * still to be processed by the host.
>> + */
>> + err = virtio_balloon_register_shrinker(vb);
>> + if (err)
>> + goto out_del_balloon_wq;
>> }
>> + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) {
>> + vb->oom_nb.notifier_call = virtio_balloon_oom_notify;
>> + vb->oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY;
>> + err = register_oom_notifier(&vb->oom_nb);
>> + if (err < 0)
>> + goto out_unregister_shrinker;
>> + }
>> +
>
>
> Let's decide whether...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...are
>> + * still to be processed by the host.
>> + */
>> + err = virtio_balloon_register_shrinker(vb);
>> + if (err)
>> + goto out_del_balloon_wq;
>> }
>> + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) {
>> + vb->oom_nb.notifier_call = virtio_balloon_oom_notify;
>> + vb->oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY;
>> + err = register_oom_notifier(&vb->oom_nb);
>> + if (err < 0)
>> + goto out_unregister_shrinker;
>> + }
>> +
>
>
> Let's decide whether...
2018 Jan 26
1
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...nt) {
> + case NETDEV_REGISTER:
> + return virtnet_register_vf(event_dev);
> + case NETDEV_UNREGISTER:
> + return virtnet_unregister_vf(event_dev);
> + default:
> + return NOTIFY_DONE;
> + }
> +}
> +
> +static struct notifier_block virtio_netdev_notifier = {
> + .notifier_call = virtio_netdev_event,
> +};
> +
> static __init int virtio_net_driver_init(void)
> {
> int ret;
> @@ -2877,6 +3177,8 @@ static __init int virtio_net_driver_init(void)
> ret = register_virtio_driver(&virtio_net_driver);
> if (ret)
> goto err_virtio;...
2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...config | 1 +
> arch/s390/include/asm/cio.h | 11 +++++
> drivers/s390/cio/css.c | 110 ++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 122 insertions(+)
>
(...)
> @@ -1018,6 +1024,109 @@ static struct notifier_block css_power_notifier = {
> .notifier_call = css_power_event,
> };
>
> +#define POOL_INIT_PAGES 1
> +static struct gen_pool *cio_dma_pool;
> +/* Currently cio supports only a single css */
This comment looks misplaced.
> +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO)
> +
> +
> +struct device *cio_get_dma_css...
2019 May 27
3
[PATCH v2 2/8] s390/cio: introduce DMA pools to cio
...config | 1 +
> arch/s390/include/asm/cio.h | 11 +++++
> drivers/s390/cio/css.c | 110 ++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 122 insertions(+)
>
(...)
> @@ -1018,6 +1024,109 @@ static struct notifier_block css_power_notifier = {
> .notifier_call = css_power_event,
> };
>
> +#define POOL_INIT_PAGES 1
> +static struct gen_pool *cio_dma_pool;
> +/* Currently cio supports only a single css */
This comment looks misplaced.
> +#define CIO_DMA_GFP (GFP_KERNEL | __GFP_ZERO)
> +
> +
> +struct device *cio_get_dma_css...
2005 Aug 04
7
[PATCH] Convert shutdown to use xenstore
The attached patch:
1. Converts the shutdown driver and xend to use the store instead of
control messages,
2. Includes Anthony''s xenstore notification code, and
3. Changes xend so that sysrq''s are no longer sent as "special case"
shutdown messages. Store keys are cheap, so making the sysrq
delivery less obscure is good.
I think I have made all of the
2023 Apr 03
0
[Patch v3] vdpa/mlx5: Avoid losing link state updates
...DONE;
> >> + }
> >> + return ret;
> >> + }
> >> + return ret;
> >> +}
> >> +
> >> +static void register_link_notifier(struct mlx5_vdpa_net *ndev)
> >> +{
> >> + ndev->nb.notifier_call = event_handler;
> >> + mlx5_notifier_register(ndev->mvdev.mdev, &ndev->nb);
> >> + ndev->nb_registered = true;
> >> + queue_link_work(ndev);
> >> +}
> >> +
> >> +static void unregister_link_notifier(struct mlx5_vd...
2016 Nov 09
2
[PATCH] drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE
...ts unregistered on runtime suspend, and
we also want to intercept ACPI_VIDEO_NOTIFY_PROBE when runtime suspended.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
Note that ACPI_VIDEO_NOTIFY_PROBE currently is a private define in
drivers/acpi/acpi_video.c, since it is passed to acpi_notifier_call_chain()
it really should be in a public header, so I've submitted a patch to
the acpi subsys to move it to include/acpi/video.h . In the mean time
this patch defines it with a #ifndef guard to allow merging without
introducing inter subsys dependencies. I will submit a follow up patch
removing...
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...urr_queue_pairs);
1923
1924 virtnet_init_settings(dev);
1925
1926 err = register_netdev(dev);
1927 if (err) {
1928 pr_debug("virtio_net: registering device failed\n");
1929 goto free_vqs;
1930 }
1931
1932 virtio_device_ready(vdev);
1933
1934 vi->nb.notifier_call = &virtnet_cpu_callback;
1935 err = register_hotcpu_notifier(&vi->nb);
1936 if (err) {
1937 pr_debug("virtio_net: registering cpu notifier failed\n");
1938 goto free_unregister_netdev;
1939 }
1940
1941 /* Assume link up if device can't report link sta...
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...urr_queue_pairs);
1923
1924 virtnet_init_settings(dev);
1925
1926 err = register_netdev(dev);
1927 if (err) {
1928 pr_debug("virtio_net: registering device failed\n");
1929 goto free_vqs;
1930 }
1931
1932 virtio_device_ready(vdev);
1933
1934 vi->nb.notifier_call = &virtnet_cpu_callback;
1935 err = register_hotcpu_notifier(&vi->nb);
1936 if (err) {
1937 pr_debug("virtio_net: registering cpu notifier failed\n");
1938 goto free_unregister_netdev;
1939 }
1940
1941 /* Assume link up if device can't report link sta...
2018 Jan 17
0
[PATCH v22 3/3] virtio-balloon: don't report free pages when page poisoning is enabled
...O_BALLOON_FREE_PAGE_REPORT_STOP_ID;
+ if (IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY) ||
+ !page_poisoning_enabled())
+ poison_val = 0;
+ else
+ poison_val = PAGE_POISON;
+ virtio_cwrite(vb->vdev, struct virtio_balloon_config,
+ poison_val, &poison_val);
}
vb->nb.notifier_call = virtballoon_oom_notify;
diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
index 55e2456..5861876 100644
--- a/include/uapi/linux/virtio_balloon.h
+++ b/include/uapi/linux/virtio_balloon.h
@@ -47,6 +47,8 @@ struct virtio_balloon_config {
__u32 actual;
/* Fr...
2018 Feb 08
0
[PATCH v28 4/4] virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
...+ if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) {
+ page_poison_val_get((u8 *)&poison_val);
+ memset(&poison_val, poison_val, sizeof(poison_val));
+ virtio_cwrite(vb->vdev, struct virtio_balloon_config,
+ poison_val, &poison_val);
+ }
}
vb->nb.notifier_call = virtballoon_oom_notify;
@@ -846,6 +853,11 @@ static int virtballoon_restore(struct virtio_device *vdev)
static int virtballoon_validate(struct virtio_device *vdev)
{
+ uint8_t unused;
+
+ if (!page_poison_val_get(&unused))
+ __virtio_clear_bit(vdev, VIRTIO_BALLOON_F_PAGE_POISON);
+
__v...
2020 Mar 10
0
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...essed by the host.
> >> + */
> >> + err = virtio_balloon_register_shrinker(vb);
> >> + if (err)
> >> + goto out_del_balloon_wq;
> >> }
> >> + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) {
> >> + vb->oom_nb.notifier_call = virtio_balloon_oom_notify;
> >> + vb->oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY;
> >> + err = register_oom_notifier(&vb->oom_nb);
> >> + if (err < 0)
> >> + goto out_unregister_shrinker;
> >> + }
> >> +
> >...
2008 Aug 26
0
[PATCH] xen: compilation fix fo xen CPU hotplugging.
...#include <xen/xenbus.h>
-#include <asm-x86/xen/hypervisor.h>
+#include <asm/xen/hypervisor.h>
#include <asm/cpu.h>
static void enable_hotplug_cpu(int cpu)
@@ -78,7 +78,7 @@ static int __init setup_vcpu_hotplug_event(void)
static struct notifier_block xsn_cpu = {
.notifier_call = setup_cpu_watcher };
- if (!is_running_on_xen())
+ if (!xen_pv_domain())
return -ENODEV;
register_xenstore_notifier(&xsn_cpu);
--
1.6.0.rc0.42.g186458
2008 Aug 26
0
[PATCH] xen: compilation fix fo xen CPU hotplugging.
...#include <xen/xenbus.h>
-#include <asm-x86/xen/hypervisor.h>
+#include <asm/xen/hypervisor.h>
#include <asm/cpu.h>
static void enable_hotplug_cpu(int cpu)
@@ -78,7 +78,7 @@ static int __init setup_vcpu_hotplug_event(void)
static struct notifier_block xsn_cpu = {
.notifier_call = setup_cpu_watcher };
- if (!is_running_on_xen())
+ if (!xen_pv_domain())
return -ENODEV;
register_xenstore_notifier(&xsn_cpu);
--
1.6.0.rc0.42.g186458
2008 Aug 26
0
[PATCH] xen: compilation fix fo xen CPU hotplugging.
...#include <xen/xenbus.h>
-#include <asm-x86/xen/hypervisor.h>
+#include <asm/xen/hypervisor.h>
#include <asm/cpu.h>
static void enable_hotplug_cpu(int cpu)
@@ -78,7 +78,7 @@ static int __init setup_vcpu_hotplug_event(void)
static struct notifier_block xsn_cpu = {
.notifier_call = setup_cpu_watcher };
- if (!is_running_on_xen())
+ if (!xen_pv_domain())
return -ENODEV;
register_xenstore_notifier(&xsn_cpu);
--
1.6.0.rc0.42.g186458
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...t);
+ /*
+ * We're allowed to reuse any free pages, even if they are
+ * still to be processed by the host.
+ */
+ err = virtio_balloon_register_shrinker(vb);
+ if (err)
+ goto out_del_balloon_wq;
}
+ if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) {
+ vb->oom_nb.notifier_call = virtio_balloon_oom_notify;
+ vb->oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY;
+ err = register_oom_notifier(&vb->oom_nb);
+ if (err < 0)
+ goto out_unregister_shrinker;
+ }
+
if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) {
/* Start with poison val of...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...t);
+ /*
+ * We're allowed to reuse any free pages, even if they are
+ * still to be processed by the host.
+ */
+ err = virtio_balloon_register_shrinker(vb);
+ if (err)
+ goto out_del_balloon_wq;
}
+ if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) {
+ vb->oom_nb.notifier_call = virtio_balloon_oom_notify;
+ vb->oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY;
+ err = register_oom_notifier(&vb->oom_nb);
+ if (err < 0)
+ goto out_unregister_shrinker;
+ }
+
if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON)) {
/* Start with poison val of...