lkml.org 
[lkml]   [2004]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 1/3] radix priority search tree - objrmap complexity fix


> #define VN_MAPPED(vp) \
> - (!list_empty(&(LINVFS_GET_IP(vp)->i_mapping->i_mmap)) || \
> - (!list_empty(&(LINVFS_GET_IP(vp)->i_mapping->i_mmap_shared))))
> + (!prio_tree_empty(&(LINVFS_GET_IP(vp)->i_mapping->i_mmap)) || \
> + (!prio_tree_empty(&(LINVFS_GET_IP(vp)->i_mapping->i_mmap_shared))))

I think we will need the following too:
(!list_empty(&(LINVFS_GET_IP(vp)->i_mmaping->i_mmap_nonlinear)


> down(&mapping->i_shared_sem);
> - list_for_each_entry(vma, &mapping->i_mmap_shared, shared) {
> + vma = __vma_prio_tree_first(&mapping->i_mmap_shared, &iter, 0, ULONG_MAX);
> + while (vma) {
> if (!(vma->vm_flags & VM_DENYWRITE)) {
> prohibited |= (1 << DM_EVENT_WRITE);
> break;
> }
> +
> + vma = __vma_prio_tree_next(vma, &mapping->i_mmap_shared, &iter, 0, ULONG_MAX);
> }

This part looks fine. But, I am not sure whether you have to handle
nonlinear maps here.

list_for_each_entry(vma, &mapping->i_mmap_nonlinear, shared) {
...
}

> up(&mapping->i_shared_sem);
> #else

Hope that helps.

Rajesh
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.182 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site