search for: notifier_block

Displaying 20 results from an estimated 567 matches for "notifier_block".

2012 Dec 26
5
[RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug
...false; + /* FIXME: MTU in config. */ #define MAX_PACKET_LEN (ETH_HLEN + VLAN_HLEN + ETH_DATA_LEN) #define GOOD_COPY_LEN 128 @@ -1041,6 +1044,26 @@ static void virtnet_set_affinity(struct virtnet_info *vi, bool set) vi->affinity_hint_set = false; } +static int virtnet_cpu_callback(struct notifier_block *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 = { +...
2012 Dec 26
5
[RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug
...false; + /* FIXME: MTU in config. */ #define MAX_PACKET_LEN (ETH_HLEN + VLAN_HLEN + ETH_DATA_LEN) #define GOOD_COPY_LEN 128 @@ -1041,6 +1044,26 @@ static void virtnet_set_affinity(struct virtnet_info *vi, bool set) vi->affinity_hint_set = false; } +static int virtnet_cpu_callback(struct notifier_block *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 = { +...
2014 Oct 08
2
[PATCH 2/2] virtio_balloon: free some memory from baloon on OOM
...C(oom_vballoon_pages, "pages to free on OOM"); struct virtio_balloon { @@ -71,6 +78,9 @@ struct virtio_balloon /* Memory statistics */ int need_stats_update; struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR]; + + /* To register callback in oom notifier call chain */ + struct notifier_block nb; }; static struct virtio_device_id id_table[] = { @@ -290,6 +300,33 @@ static void update_balloon_size(struct virtio_balloon *vb) &actual); } +/* + * virtballoon_oom_notify - release pages when system is under severe + * memory pressure (called from o...
2014 Oct 08
2
[PATCH 2/2] virtio_balloon: free some memory from baloon on OOM
...C(oom_vballoon_pages, "pages to free on OOM"); struct virtio_balloon { @@ -71,6 +78,9 @@ struct virtio_balloon /* Memory statistics */ int need_stats_update; struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR]; + + /* To register callback in oom notifier call chain */ + struct notifier_block nb; }; static struct virtio_device_id id_table[] = { @@ -290,6 +300,33 @@ static void update_balloon_size(struct virtio_balloon *vb) &actual); } +/* + * virtballoon_oom_notify - release pages when system is under severe + * memory pressure (called from o...
2016 Jun 30
2
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...gt; @@ -2237,6 +2237,7 @@ struct netdev_lag_lower_state_info { > #define NETDEV_PRECHANGEUPPER 0x001A > #define NETDEV_CHANGELOWERSTATE 0x001B > #define NETDEV_UDP_TUNNEL_PUSH_INFO 0x001C > +#define NETDEV_CHANGE_TX_QUEUE_LEN 0x001E > > int register_netdevice_notifier(struct notifier_block *nb); > int unregister_netdevice_notifier(struct notifier_block *nb); > diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c > index 7a0b616..6e4f347 100644 > --- a/net/core/net-sysfs.c > +++ b/net/core/net-sysfs.c > @@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); &gt...
2016 Jun 30
2
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...gt; @@ -2237,6 +2237,7 @@ struct netdev_lag_lower_state_info { > #define NETDEV_PRECHANGEUPPER 0x001A > #define NETDEV_CHANGELOWERSTATE 0x001B > #define NETDEV_UDP_TUNNEL_PUSH_INFO 0x001C > +#define NETDEV_CHANGE_TX_QUEUE_LEN 0x001E > > int register_netdevice_notifier(struct notifier_block *nb); > int unregister_netdevice_notifier(struct notifier_block *nb); > diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c > index 7a0b616..6e4f347 100644 > --- a/net/core/net-sysfs.c > +++ b/net/core/net-sysfs.c > @@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); &gt...
2017 May 09
3
[PATCH v2 5/5] ACPI: button: Obselete acpi_lid_open() invocations
...drivers/gpu/drm/i915/intel_lvds.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 7ff3a75..50d7898 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -348,7 +348,12 @@ int acpi_lid_notifier_unregister(struct notifier_block *nb) } EXPORT_SYMBOL(acpi_lid_notifier_unregister); -int acpi_lid_open(void) +/* + * The intentional usage model is to register a lid notifier and use the + * notified value instead. Directly evaluating _LID without seeing a + * Notify(lid, 0x80) is not reliable. + */ +int __deprecated acpi_lid...
2013 Oct 14
4
[PATCH net 1/2] virtio-net: don't respond to cpu hotplug notifier if we're not ready
...ve. --- drivers/net/virtio_net.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index defec2b..c4bc1cc 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1116,6 +1116,11 @@ static int virtnet_cpu_callback(struct notifier_block *nfb, { struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb); + mutex_lock(&vi->config_lock); + + if (!vi->config_enable) + goto done; + switch(action & ~CPU_TASKS_FROZEN) { case CPU_ONLINE: case CPU_DOWN_FAILED: @@ -1128,6 +1133,9 @@ static int virtnet_cpu...
2013 Oct 14
4
[PATCH net 1/2] virtio-net: don't respond to cpu hotplug notifier if we're not ready
...ve. --- drivers/net/virtio_net.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index defec2b..c4bc1cc 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1116,6 +1116,11 @@ static int virtnet_cpu_callback(struct notifier_block *nfb, { struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb); + mutex_lock(&vi->config_lock); + + if (!vi->config_enable) + goto done; + switch(action & ~CPU_TASKS_FROZEN) { case CPU_ONLINE: case CPU_DOWN_FAILED: @@ -1128,6 +1133,9 @@ static int virtnet_cpu...
2020 Jan 10
0
[PATCH 18/23] drm/sti: Convert to CRTC VBLANK callbacks
...3 --- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_crtc.c b/drivers/gpu/drm/sti/sti_crtc.c index dc64fbfc4e61..49e6cb8f5836 100644 --- a/drivers/gpu/drm/sti/sti_crtc.c +++ b/drivers/gpu/drm/sti/sti_crtc.c @@ -279,12 +279,13 @@ int sti_crtc_vblank_cb(struct notifier_block *nb, return 0; } -int sti_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe) +static int sti_crtc_enable_vblank(struct drm_crtc *crtc) { + struct drm_device *dev = crtc->dev; + unsigned int pipe = crtc->index; struct sti_private *dev_priv = dev->dev_private; struct sti...
2018 Jan 26
1
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
On Thu, Jan 11, 2018 at 09:58:39PM -0800, Sridhar Samudrala wrote: > @@ -2859,6 +3123,42 @@ static struct virtio_driver virtio_net_driver = { > #endif > }; > > +static int virtio_netdev_event(struct notifier_block *this, > + unsigned long event, void *ptr) > +{ > + struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); > + > + /* Skip our own events */ > + if (event_dev->netdev_ops == &virtnet_netdev) > + return NOTIFY_DONE; > + > + /* Avoid non-Ethernet...
2023 May 03
1
[PATCH v5 virtio 04/11] pds_vdpa: move enum from common to adminq header
...-enum pds_core_logical_qtype { - PDS_CORE_QTYPE_ADMINQ = 0, - PDS_CORE_QTYPE_NOTIFYQ = 1, - PDS_CORE_QTYPE_RXQ = 2, - PDS_CORE_QTYPE_TXQ = 3, - PDS_CORE_QTYPE_EQ = 4, - - PDS_CORE_QTYPE_MAX = 16 /* don't change - used in struct size */ -}; - int pdsc_register_notify(struct notifier_block *nb); void pdsc_unregister_notify(struct notifier_block *nb); void *pdsc_get_pf_struct(struct pci_dev *vf_pdev); -- 2.17.1
2016 Jun 30
1
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...tate_info { >>> #define NETDEV_PRECHANGEUPPER 0x001A >>> #define NETDEV_CHANGELOWERSTATE 0x001B >>> #define NETDEV_UDP_TUNNEL_PUSH_INFO 0x001C >>> +#define NETDEV_CHANGE_TX_QUEUE_LEN 0x001E >>> int register_netdevice_notifier(struct notifier_block *nb); >>> int unregister_netdevice_notifier(struct notifier_block *nb); >>> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c >>> index 7a0b616..6e4f347 100644 >>> --- a/net/core/net-sysfs.c >>> +++ b/net/core/net-sysfs.c >>> @@ -322,7...
2016 Jun 30
1
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...tate_info { >>> #define NETDEV_PRECHANGEUPPER 0x001A >>> #define NETDEV_CHANGELOWERSTATE 0x001B >>> #define NETDEV_UDP_TUNNEL_PUSH_INFO 0x001C >>> +#define NETDEV_CHANGE_TX_QUEUE_LEN 0x001E >>> int register_netdevice_notifier(struct notifier_block *nb); >>> int unregister_netdevice_notifier(struct notifier_block *nb); >>> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c >>> index 7a0b616..6e4f347 100644 >>> --- a/net/core/net-sysfs.c >>> +++ b/net/core/net-sysfs.c >>> @@ -322,7...
2013 Sep 27
4
[PATCH net-next] virtio-net: switch to use XPS to choose txq
...rtio_net.c +++ b/drivers/net/virtio_net.c @@ -127,9 +127,6 @@ struct virtnet_info { /* Does the affinity hint is set for virtqueues? */ bool affinity_hint_set; - /* Per-cpu variable to show the mapping from CPU to virtqueue */ - int __percpu *vq_index; - /* CPU hot plug notifier */ struct notifier_block nb; }; @@ -1063,7 +1060,6 @@ static int virtnet_vlan_rx_kill_vid(struct net_device *dev, static void virtnet_clean_affinity(struct virtnet_info *vi, long hcpu) { int i; - int cpu; if (vi->affinity_hint_set) { for (i = 0; i < vi->max_queue_pairs; i++) { @@ -1073,20 +1069,11 @@ s...
2013 Sep 27
4
[PATCH net-next] virtio-net: switch to use XPS to choose txq
...rtio_net.c +++ b/drivers/net/virtio_net.c @@ -127,9 +127,6 @@ struct virtnet_info { /* Does the affinity hint is set for virtqueues? */ bool affinity_hint_set; - /* Per-cpu variable to show the mapping from CPU to virtqueue */ - int __percpu *vq_index; - /* CPU hot plug notifier */ struct notifier_block nb; }; @@ -1063,7 +1060,6 @@ static int virtnet_vlan_rx_kill_vid(struct net_device *dev, static void virtnet_clean_affinity(struct virtnet_info *vi, long hcpu) { int i; - int cpu; if (vi->affinity_hint_set) { for (i = 0; i < vi->max_queue_pairs; i++) { @@ -1073,20 +1069,11 @@ s...
2013 Oct 29
3
[PATCH net] virtio-net: correctly handle cpu hotplug notifier during resuming
...irtio_net.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9fbdfcd..bbc9cb8 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1118,11 +1118,6 @@ static int virtnet_cpu_callback(struct notifier_block *nfb, { struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb); - mutex_lock(&vi->config_lock); - - if (!vi->config_enable) - goto done; - switch(action & ~CPU_TASKS_FROZEN) { case CPU_ONLINE: case CPU_DOWN_FAILED: @@ -1136,8 +1131,6 @@ static int virtnet_cpu...
2013 Oct 29
3
[PATCH net] virtio-net: correctly handle cpu hotplug notifier during resuming
...irtio_net.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9fbdfcd..bbc9cb8 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1118,11 +1118,6 @@ static int virtnet_cpu_callback(struct notifier_block *nfb, { struct virtnet_info *vi = container_of(nfb, struct virtnet_info, nb); - mutex_lock(&vi->config_lock); - - if (!vi->config_enable) - goto done; - switch(action & ~CPU_TASKS_FROZEN) { case CPU_ONLINE: case CPU_DOWN_FAILED: @@ -1136,8 +1131,6 @@ static int virtnet_cpu...
2014 Oct 08
3
[PATCH 0/2] shrink virtio baloon on OOM in guest
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast changing memory load. As a result OS runs out of memory and invokes OOM-killer. The balancing of
2014 Oct 08
3
[PATCH 0/2] shrink virtio baloon on OOM in guest
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast changing memory load. As a result OS runs out of memory and invokes OOM-killer. The balancing of