search for: list_head

Displaying 20 results from an estimated 2272 matches for "list_head".

2007 May 17
1
[PATCH] ocfs: use list_for_each_entry where benefical
...============================================== --- linux-2.6.orig/fs/ocfs2/cluster/tcp.c 2007-05-06 13:51:17.000000000 +0200 +++ linux-2.6/fs/ocfs2/cluster/tcp.c 2007-05-17 15:00:14.000000000 +0200 @@ -261,14 +261,12 @@ out: static void o2net_complete_nodes_nsw(struct o2net_node *nn) { - struct list_head *iter, *tmp; + struct o2net_status_wait *nsw, *tmp; unsigned int num_kills = 0; - struct o2net_status_wait *nsw; assert_spin_locked(&nn->nn_lock); - list_for_each_safe(iter, tmp, &nn->nn_status_list) { - nsw = list_entry(iter, struct o2net_status_wait, ns_node_item); + list_f...
2018 May 24
3
[PATCH] drm/nouveau/secboot/acr: Remove VLA usage
...r_r352.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c index a721354249ce..d02e183717dc 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c @@ -414,6 +414,20 @@ acr_r352_ls_write_wpr(struct acr_r352 *acr, struct list_head *imgs, { struct ls_ucode_img *_img; u32 pos = 0; + u32 max_desc_size = 0; + u8 *gdesc; + + /* Figure out how large we need gdesc to be. */ + list_for_each_entry(_img, imgs, node) { + const struct acr_r352_ls_func *ls_func = + acr->func->ls_func[_img->falcon_id]; + + max_desc...
2003 Feb 26
0
[Bug 56] New: super-long erroneous timeouts in conntrack table (semantics of list_del() change)
...ipt_REDIRECT, and after upgrading to 2.4.20, found that conntrack table overflows after a week or so. Quick examination showed large number of entries in SYN_SENT state with super long timeouts exist. The offending change was in include/linux/list.h. list_del() now zeros prev and next pointer of list_head, which circumvents is_confirmed() test. This didn't cause troubles to most conntrack entries which disappear by timing out. But as our cache was bypassing some of the connections, the machine was seeing only one way stream of packets (!IPS_SEEN_REPLY). And when the originating host terminat...
2019 Dec 18
7
[PATCH v3 0/5] iommu: Implement generic_iommu_put_resv_regions()
From: Thierry Reding <treding at nvidia.com> Most IOMMU drivers only need to free the memory allocated for each reserved region. Instead of open-coding the loop to do this in each driver, extract the code into a common function that can be used by all these drivers. Changes in v3: - add Reviewed-by from Jean-Philippe Brucker on virtio patch - add Acked-by from Will Deacon on ARM SMMU patch
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
..._dev *dev, struct vhost_work *work); -long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp); - -struct vhost_log { - u64 addr; - u64 len; -}; - -#define START(node) ((node)->start) -#define LAST(node) ((node)->last) - -struct vhost_umem_node { - struct rb_node rb; - struct list_head link; - __u64 start; - __u64 last; - __u64 size; - __u64 userspace_addr; - __u32 perm; - __u32 flags_padding; - __u64 __subtree_last; -}; - -struct vhost_umem { - struct rb_root umem_tree; - struct list_head umem_list; - int numem; -}; - -enum vhost_uaddr_type { - VHOST_ADDR_DESC = 0, - VHOST_ADDR_...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
..._dev *dev, struct vhost_work *work); -long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp); - -struct vhost_log { - u64 addr; - u64 len; -}; - -#define START(node) ((node)->start) -#define LAST(node) ((node)->last) - -struct vhost_umem_node { - struct rb_node rb; - struct list_head link; - __u64 start; - __u64 last; - __u64 size; - __u64 userspace_addr; - __u32 perm; - __u32 flags_padding; - __u64 __subtree_last; -}; - -struct vhost_umem { - struct rb_root umem_tree; - struct list_head umem_list; - int numem; -}; - -enum vhost_uaddr_type { - VHOST_ADDR_DESC = 0, - VHOST_ADDR_...
2005 Sep 09
7
[PATCH 0/6] jbd cleanup
The following 6 patches cleanup the jbd code and kill about 200 lines. First of 4 patches can apply to 2.6.13-git8 and 2.6.13-mm2. The rest of them can apply to 2.6.13-mm2. fs/jbd/checkpoint.c | 179 +++++++++++-------------------------------- fs/jbd/commit.c | 101 ++++++++++-------------- fs/jbd/journal.c | 11 +- fs/jbd/revoke.c | 158
2019 Oct 30
0
[PATCH 2/3] virtiofs: Do not send forget request "struct list_head" element
...rtio_fs { unsigned int num_request_queues; /* number of request queues */ }; -struct virtio_fs_forget { +struct virtio_fs_forget_req { struct fuse_in_header ih; struct fuse_forget_in arg; +}; + +struct virtio_fs_forget { /* This request can be temporarily queued on virt queue */ struct list_head list; + struct virtio_fs_forget_req req; }; static int virtio_fs_enqueue_req(struct virtio_fs_vq *fsvq, @@ -325,6 +329,7 @@ static int send_forget_request(struct virtio_fs_vq *fsvq, struct virtqueue *vq; int ret = 0; bool notify; + struct virtio_fs_forget_req *req = &forget->req;...
2019 Dec 09
8
[PATCH v2 0/5] iommu: Implement iommu_put_resv_regions_simple()
From: Thierry Reding <treding at nvidia.com> Most IOMMU drivers only need to free the memory allocated for each reserved region. Instead of open-coding the loop to do this in each driver, extract the code into a common function that can be used by all these drivers. Changes in v2: - change subject prefix to "iommu: virtio: " for virtio-iommu.c driver Thierry Thierry Reding (5):
2016 May 16
2
[PATCH v5 02/12] mm: migrate: support non-lru movable page migration
...names[MR_TYPES]; > > #ifdef CONFIG_MIGRATION > > +extern int PageMovable(struct page *page); > +extern void __SetPageMovable(struct page *page, struct address_space *mapping); > +extern void __ClearPageMovable(struct page *page); > extern void putback_movable_pages(struct list_head *l); > extern int migrate_page(struct address_space *, > struct page *, struct page *, enum migrate_mode); > extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free, > unsigned long private, enum migrate_mode mode, int reason); > +extern bool isolate_m...
2016 May 16
2
[PATCH v5 02/12] mm: migrate: support non-lru movable page migration
...names[MR_TYPES]; > > #ifdef CONFIG_MIGRATION > > +extern int PageMovable(struct page *page); > +extern void __SetPageMovable(struct page *page, struct address_space *mapping); > +extern void __ClearPageMovable(struct page *page); > extern void putback_movable_pages(struct list_head *l); > extern int migrate_page(struct address_space *, > struct page *, struct page *, enum migrate_mode); > extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free, > unsigned long private, enum migrate_mode mode, int reason); > +extern bool isolate_m...
2015 Jan 06
2
[PATCH nouveau 06/11] platform: complete the power up/down sequence
...nvidia,swgroup = <&mc TEGRA_SWGROUP_GPU>; > > ... > > }; > > > >In the DT and return a struct tegra_mc_swgroup along the lines of: > > > > struct tegra_mc_client { > > unsigned int id; > > unsigned int swgroup; > > > > struct list_head list; > > }; > > > > struct tegra_mc_swgroup { > > struct list_head clients; > > unsigned int id; > > }; > > > >Where tegra_mc_swgroup.clients is a list of struct tegra_mc_client > >structures, each representing a memory client pertaining to t...
2012 Feb 06
1
[PATCH] ia64: fix build (next instance)
...4_PROCESSOR_H */ --- a/xen/include/xen/list.h +++ b/xen/include/xen/list.h @@ -8,7 +8,6 @@ #define __XEN_LIST_H__ #include <xen/lib.h> -#include <xen/prefetch.h> #include <asm/system.h> /* These are non-NULL pointers that will result in page faults @@ -40,6 +39,9 @@ struct list_head { #define LIST_HEAD_READ_MOSTLY(name) \ struct list_head __read_mostly name = LIST_HEAD_INIT(name) +/* Do not move this ahead of the struct list_head definition! */ +#include <xen/prefetch.h> + static inline void INIT_LIST_HEAD(struct list_head *list) { list->next = list; --...
2015 Jan 05
2
[PATCH nouveau 06/11] platform: complete the power up/down sequence
...of the SWGROUP). So I think we'll want something like: gpu at 0,57000000 { ... nvidia,swgroup = <&mc TEGRA_SWGROUP_GPU>; ... }; In the DT and return a struct tegra_mc_swgroup along the lines of: struct tegra_mc_client { unsigned int id; unsigned int swgroup; struct list_head list; }; struct tegra_mc_swgroup { struct list_head clients; unsigned int id; }; Where tegra_mc_swgroup.clients is a list of struct tegra_mc_client structures, each representing a memory client pertaining to the SWGROUP. We probably don't want to expose these structures publicly, an o...
2016 Mar 03
1
RFC: [PATCH] x86/kmmio: fix mmiotrace for hugepages
...89 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 29 deletions(-) diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c index 637ab34..d203beb 100644 --- a/arch/x86/mm/kmmio.c +++ b/arch/x86/mm/kmmio.c @@ -33,7 +33,7 @@ struct kmmio_fault_page { struct list_head list; struct kmmio_fault_page *release_next; - unsigned long page; /* location of the fault page */ + unsigned long addr; /* the requested address */ pteval_t old_presence; /* page presence prior to arming */ bool armed; @@ -70,9 +70,16 @@ unsigned int kmmio_count; static struct list_head...
2018 Jun 22
0
[PATCH] drm/nouveau/secboot/acr: Remove VLA usage
...pu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c > index a721354249ce..d02e183717dc 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c > @@ -414,6 +414,20 @@ acr_r352_ls_write_wpr(struct acr_r352 *acr, struct list_head *imgs, > { > struct ls_ucode_img *_img; > u32 pos = 0; > + u32 max_desc_size = 0; > + u8 *gdesc; > + > + /* Figure out how large we need gdesc to be. */ > + list_for_each_entry(_img, imgs, node) { > + const struct acr...
2003 Jun 13
0
Problem with large NIS groups - Samba 2.2.8
...t of groups into every share list and incur large overhead. I've tried to write some additional code to do a lookup by gid, but this involves a sequential search and it turns out to be unacceptably expensive: struct sys_userlist *get_users_in_group_by_gid(gid_t gid) { struct sys_userlist *list_head = NULL; struct group *gptr; setgrent(); while((gptr = getgrent()) != NULL) { if (gid == gptr->gr_gid) { list_head = add_members_to_userlist(list_head, gptr); if (list_head == NULL) return NULL; } } endgrent(); return list_head; } It all comes down to the fact that...
2017 Mar 10
0
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...(struct vhost_dev *d, int ioctl, void __user *argp); > - > -struct vhost_log { > - u64 addr; > - u64 len; > -}; > - > -#define START(node) ((node)->start) > -#define LAST(node) ((node)->last) > - > -struct vhost_umem_node { > - struct rb_node rb; > - struct list_head link; > - __u64 start; > - __u64 last; > - __u64 size; > - __u64 userspace_addr; > - __u32 perm; > - __u32 flags_padding; > - __u64 __subtree_last; > -}; > - > -struct vhost_umem { > - struct rb_root umem_tree; > - struct list_head umem_list; > - int numem; &g...
2009 Apr 22
1
[PATCH 1/1] OCFS2: fasten dlm_lock_resource hash_table lookups
...M_HASH_BUCKETS; i++) { redo_bucket: n = 0; - bucket = &dlm->lockres_hash[i]; + bucket = dlm_lockres_hash(dlm, i); iter = bucket->first; while (iter) { n++; @@ -1356,7 +1384,8 @@ static struct dlm_ctxt *dlm_alloc_ctxt(c goto leave; } - dlm->lockres_hash = (struct hlist_head *) __get_free_page(GFP_KERNEL); + dlm->lockres_hash = (struct hlist_head **) + dlm_alloc_pagevec(DLM_HASH_PAGES); if (!dlm->lockres_hash) { mlog_errno(-ENOMEM); kfree(dlm->name); @@ -1366,7 +1395,7 @@ static struct dlm_ctxt *dlm_alloc_ctxt(c } for (i=0; i<DLM_HASH_BUCKE...
2012 Nov 28
2
[PATCH] VT-d: make scope parsing code type safe
...nt); } else { --- a/xen/drivers/passthrough/vtd/dmar.h +++ b/xen/drivers/passthrough/vtd/dmar.h @@ -59,7 +59,7 @@ struct dmar_scope { }; struct acpi_drhd_unit { - struct dmar_scope scope; /* must be first member of struct */ + struct dmar_scope scope; struct list_head list; u64 address; /* register base address of the unit */ u16 segment; @@ -70,7 +70,7 @@ struct acpi_drhd_unit { }; struct acpi_rmrr_unit { - struct dmar_scope scope; /* must be first member of struct */ + struct dmar_scope scope; struc...