search for: default_flags

Displaying 20 results from an estimated 65 matches for "default_flags".

2020 May 05
1
[PATCH hmm v2 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault
...range.hmm_pfns = ...; > - range.flags = ...; > - range.values = ...; > - range.pfn_shift = ...; > > if (!mmget_not_zero(interval_sub->notifier.mm)) > return -EFAULT; > @@ -229,15 +226,10 @@ The hmm_range struct has 2 fields, default_flags and pfn_flags_mask, that specif > fault or snapshot policy for the whole range instead of having to set them > for each entry in the pfns array. > > -For instance, if the device flags for range.flags are:: > +For instance if the device driver wants pages for a range with at le...
2020 Mar 20
1
[PATCH 3/4] mm: simplify device private page handling in hmm_range_fault
...lags, >> + .values = dmirror_hmm_values, >> + .pfn_shift = DPT_SHIFT, >> + .pfn_flags_mask = ~(dmirror_hmm_flags[HMM_PFN_VALID] | >> + dmirror_hmm_flags[HMM_PFN_WRITE]), > > Since pfns is not initialized pfn_flags_mask should be 0. Good point. >> + .default_flags = dmirror_hmm_flags[HMM_PFN_VALID] | >> + (write ? dmirror_hmm_flags[HMM_PFN_WRITE] : 0), >> + .dev_private_owner = dmirror->mdevice, >> + }; >> + int ret = 0; > >> +static int dmirror_snapshot(struct dmirror *dmirror, >> + struct hmm_dmirror_cmd...
2020 Sep 17
2
Re: [libnbd PATCH v2 4/5] api: Add STRICT_FLAGS to set_strict_mode
...a signature that takes uint32_t; if we wanted, we could pack > libnbd-specific flags in the upper bits that the NBD protocol would > never see. This is fine ACK. About the "guard" change: I probably would have put that change in a separate commit. Also you could consider having a default_flags parameter to avoid having to set guard = None everywhere, although you would still have to make a one-off change to every *_flags. It would look like this: let default_flags = { flag_prefix = ""; guard = None; flags = [] } ... let handshake_flags = { default_flags with f...
2020 Apr 22
0
[PATCH hmm 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault
...range.start = ...; range.end = ...; range.pfns = ...; - range.flags = ...; - range.values = ...; - range.pfn_shift = ...; if (!mmget_not_zero(interval_sub->notifier.mm)) return -EFAULT; @@ -229,15 +226,10 @@ The hmm_range struct has 2 fields, default_flags and pfn_flags_mask, that specif fault or snapshot policy for the whole range instead of having to set them for each entry in the pfns array. -For instance, if the device flags for range.flags are:: +For instance if the device driver wants pages for a range with at least read +permission, it set...
2020 May 01
0
[PATCH hmm v2 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault
...range.start = ...; range.end = ...; range.pfns = ...; - range.flags = ...; - range.values = ...; - range.pfn_shift = ...; if (!mmget_not_zero(interval_sub->notifier.mm)) return -EFAULT; @@ -229,15 +226,10 @@ The hmm_range struct has 2 fields, default_flags and pfn_flags_mask, that specif fault or snapshot policy for the whole range instead of having to set them for each entry in the pfns array. -For instance, if the device flags for range.flags are:: +For instance if the device driver wants pages for a range with at least read +permission, it set...
2020 Apr 22
1
[PATCH hmm 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault
...= ...; > range.pfns = ...; > - range.flags = ...; > - range.values = ...; > - range.pfn_shift = ...; > > if (!mmget_not_zero(interval_sub->notifier.mm)) > return -EFAULT; > @@ -229,15 +226,10 @@ The hmm_range struct has 2 fields, default_flags and pfn_flags_mask, that specif > fault or snapshot policy for the whole range instead of having to set them > for each entry in the pfns array. > > -For instance, if the device flags for range.flags are:: > +For instance if the device driver wants pages for a range with at least...
2020 Apr 22
11
[PATCH hmm 0/5] Adjust hmm_range_fault() API
...MM_PFN_VALID)); - page = hmm_device_entry_to_page(range, *pfns); + page = hmm_pfn_to_page(*pfns); WARN_ON(!page); entry = page; - if (*pfns & range->flags[HMM_PFN_WRITE]) + if (*pfns & HMM_PFN_WRITE) entry = xa_tag_pointer(entry, DPT_XA_TAG_WRITE); - else if (range->default_flags & range->flags[HMM_PFN_WRITE]) + else if (WARN_ON(range->default_flags & HMM_PFN_WRITE)) return -EFAULT; entry = xa_store(&dmirror->pt, pfn, entry, GFP_ATOMIC); if (xa_is_err(entry)) @@ -260,8 +246,6 @@ static int dmirror_range_fault(struct dmirror *dmirror, int re...
2020 Sep 17
0
Re: [libnbd PATCH v2 4/5] api: Add STRICT_FLAGS to set_strict_mode
...if we wanted, we could pack >> libnbd-specific flags in the upper bits that the NBD protocol would >> never see. > > This is fine ACK. > > About the "guard" change: I probably would have put that change in a > separate commit. Also you could consider having a default_flags > parameter to avoid having to set guard = None everywhere, although you > would still have to make a one-off change to every *_flags. It would > look like this: > > let default_flags = { flag_prefix = ""; guard = None; flags = [] } > ... > let handshake_fl...
2019 Jul 01
0
[PATCH 20/22] mm: move hmm_vma_fault to nouveau
...mirror *mirror, struct hmm_range *range, + bool block) +{ + long ret; + + /* + * With the old API the driver must set each individual entries with + * the requested flags (valid, write, ...). So here we set the mask to + * keep intact the entries provided by the driver and zero out the + * default_flags. + */ + range->default_flags = 0; + range->pfn_flags_mask = -1UL; + + ret = hmm_range_register(range, mirror, + range->start, range->end, + PAGE_SHIFT); + if (ret) + return (int)ret; + + if (!hmm_range_wait_until_valid(range, NOUVEAU_RANGE_FAULT_TIMEOUT)) { + /* + * The mma...
2020 May 01
13
[PATCH hmm v2 0/5] Adjust hmm_range_fault() API
From: Jason Gunthorpe <jgg at mellanox.com> The API is a bit complicated for the uses we actually have, and disucssions for simplifying have come up a number of times. This small series removes the customizable pfn format and simplifies the return code of hmm_range_fault() All the drivers are adjusted to process in the simplified format. I would appreciated tested-by's for the two
2007 Aug 19
0
2 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_super.c libswfdec/swfdec_as_with.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite_movie.c
...2 - 9 files changed, 50 insertions(+), 51 deletions(-) New commits: diff-tree 4e35fceb28469c2bc9ee49c9ec71573d6df8861e (from cb77cc43c823c4f3260d6341cf5ed04b65783deb) Author: Benjamin Otte <otte at gnome.org> Date: Sun Aug 19 20:16:59 2007 +0200 SwfdecAsObject->set() now takes a default_flags parameter This parameter is used to set the default set of flags, when a variable is newly created. Now we don't have the need to call set_flags() after every init function diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c index a64b165..495bff1 100644 ---...
2019 Jul 03
1
[PATCH 20/22] mm: move hmm_vma_fault to nouveau
...+ bool block) > +{ > + long ret; > + > + /* > + * With the old API the driver must set each individual entries with > + * the requested flags (valid, write, ...). So here we set the mask to > + * keep intact the entries provided by the driver and zero out the > + * default_flags. > + */ > + range->default_flags = 0; > + range->pfn_flags_mask = -1UL; > + > + ret = hmm_range_register(range, mirror, > + range->start, range->end, > + PAGE_SHIFT); > + if (ret) > + return (int)ret; > + > + if (!hmm_range_wait_until_valid(ran...
2005 Dec 14
3
why would an int column in a join table be a String class in model?
i''ve got an issue with integer columns in the database becoming strings in the model and I''m not sure why this is happening. perhaps someone can explain. given the following setup (simplified for example) tables: users ---------- id - int name - varchar(60) roles ---------- id - int name - varchar(60) roles_users (join table) ---------- role_id - int user_id - int
2019 Jul 22
0
[PATCH 2/6] mm: move hmm_vma_range_done and hmm_vma_fault to nouveau
...ess); } +static inline bool nouveau_range_done(struct hmm_range *range) +{ + bool ret = hmm_range_valid(range); + + hmm_range_unregister(range); + return ret; +} + +static int +nouveau_range_fault(struct hmm_mirror *mirror, struct hmm_range *range, + bool block) +{ + long ret; + + range->default_flags = 0; + range->pfn_flags_mask = -1UL; + + ret = hmm_range_register(range, mirror, + range->start, range->end, + PAGE_SHIFT); + if (ret) + return (int)ret; + + if (!hmm_range_wait_until_valid(range, HMM_RANGE_DEFAULT_TIMEOUT)) { + up_read(&range->vma->vm_mm->mmap_sem);...
2019 Jul 03
0
[PATCH 2/6] mm: move hmm_vma_range_done and hmm_vma_fault to nouveau
...ess); } +static inline bool nouveau_range_done(struct hmm_range *range) +{ + bool ret = hmm_range_valid(range); + + hmm_range_unregister(range); + return ret; +} + +static int +nouveau_range_fault(struct hmm_mirror *mirror, struct hmm_range *range, + bool block) +{ + long ret; + + range->default_flags = 0; + range->pfn_flags_mask = -1UL; + + ret = hmm_range_register(range, mirror, + range->start, range->end, + PAGE_SHIFT); + if (ret) + return (int)ret; + + if (!hmm_range_wait_until_valid(range, NOUVEAU_RANGE_FAULT_TIMEOUT)) { + up_read(&range->vma->vm_mm->mmap_sem...
2020 Jan 14
2
[PATCH v6 5/6] nouveau: use new mmu interval notifiers
...otifier->notifier, > - .start = notifier->notifier.interval_tree.start, > - .end = notifier->notifier.interval_tree.last + 1, > + .start = start, > + .end = end, > .pfns = pfns, > .flags = nouveau_svm_pfn_flags, > .values = nouveau_svm_pfn_values, > + .default_flags = 0, > + .pfn_flags_mask = ~0UL, > .pfn_shift = NVIF_VMM_PFNMAP_V0_ADDR_SHIFT, > }; > - struct mm_struct *mm = notifier->notifier.mm; > + struct mm_struct *mm = svmm->mm; > long ret; > > while (true) { > if (time_after(jiffies, timeout)) > retu...
2019 Jul 30
0
[PATCH 07/13] mm: remove the page_shift member from struct hmm_range
...ize; range.pfns = args.phys; diff --git a/include/linux/hmm.h b/include/linux/hmm.h index c5b51376b453..51e18fbb8953 100644 --- a/include/linux/hmm.h +++ b/include/linux/hmm.h @@ -158,7 +158,6 @@ enum hmm_pfn_value_e { * @values: pfn value for some special case (none, special, error, ...) * @default_flags: default flags for the range (write, read, ... see hmm doc) * @pfn_flags_mask: allows to mask pfn flags so that only default_flags matter - * @page_shift: device virtual address shift value (should be >= PAGE_SHIFT) * @pfn_shifts: pfn shift value (should be <= PAGE_SHIFT) * @valid: pfns...
2019 Aug 06
0
[PATCH 07/15] mm: remove the page_shift member from struct hmm_range
...ize; range.pfns = args.phys; diff --git a/include/linux/hmm.h b/include/linux/hmm.h index c5b51376b453..51e18fbb8953 100644 --- a/include/linux/hmm.h +++ b/include/linux/hmm.h @@ -158,7 +158,6 @@ enum hmm_pfn_value_e { * @values: pfn value for some special case (none, special, error, ...) * @default_flags: default flags for the range (write, read, ... see hmm doc) * @pfn_flags_mask: allows to mask pfn flags so that only default_flags matter - * @page_shift: device virtual address shift value (should be >= PAGE_SHIFT) * @pfn_shifts: pfn shift value (should be <= PAGE_SHIFT) * @valid: pfns...
2020 Jun 22
1
[PATCH 08/16] nouveau/hmm: fault one page at a time
...contiguous > virtual addresses and requests hmm_range_fault() to populate and > return the page frame number of system memory mapped by the CPU. > In preparation for supporting large pages to be mapped by the GPU, > process faults one page at a time. In addition, use the hmm_range > default_flags to fix a corner case where the input hmm_pfns array > is not reinitialized after hmm_range_fault() returns -EBUSY and must > be called again. Are you sure? hmm_range_fault is pretty expensive per call.. Jason
2020 Mar 16
0
[PATCH 4/4] mm: check the device private page owner in hmm_range_fault
...>> PAGE_SHIFT) << range->pfn_shift; diff --git a/include/linux/hmm.h b/include/linux/hmm.h index 5e6034f105c3..bb6be4428633 100644 --- a/include/linux/hmm.h +++ b/include/linux/hmm.h @@ -132,6 +132,7 @@ enum hmm_pfn_value_e { * @pfn_flags_mask: allows to mask pfn flags so that only default_flags matter * @pfn_shifts: pfn shift value (should be <= PAGE_SHIFT) * @valid: pfns array did not change since it has been fill by an HMM function + * @dev_private_owner: owner of device private pages */ struct hmm_range { struct mmu_interval_notifier *notifier; @@ -144,6 +145,7 @@ struct hm...