aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/fmr_pool.c
Commit message (Collapse)AuthorAgeFilesLines
* more driver stuff from 3.2.72Wolfgang Wiedmeyer2015-10-231-0/+1
|
* RDMA: Remove subversion $Id tagsRoland Dreier2008-07-141-2/+0
| | | | | | They don't get updated by git and so they're worse than useless. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB: Use shorter list_splice_init() for brevityRobert P. J. Day2008-04-161-2/+1
| | | | | | | Convert list_splice() + INIT_LIST_HEAD() to the equivalent list_splice_init() Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/fmr_pool: Flush all dirty FMRs from ib_fmr_pool_flush()Pete Wyckoff2008-02-291-1/+16
| | | | | | | | | | | | | | | Commit a3cd7d90 ("IB/fmr_pool: ib_fmr_pool_flush() should flush all dirty FMRs") caused a regression for iSER and was reverted in e5507736. This change attempts to redo the original patch so that all used FMR entries are flushed when ib_flush_fmr_pool() is called without affecting the normal FMR pool cleaning thread. Simply move used entries from the clean list onto the dirty list in ib_flush_fmr_pool() before letting the cleanup thread do its job. Signed-off-by: Pete Wyckoff <pw@osc.edu> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* Revert "IB/fmr_pool: ib_fmr_pool_flush() should flush all dirty FMRs"Pete Wyckoff2008-02-291-15/+6
| | | | | | | | | | | | | | | | | This reverts commit a3cd7d9070be417a21905c997ee32d756d999b38. The original commit breaks iSER reliably, making it complain: iser: iser_reg_page_vec:ib_fmr_pool_map_phys failed: -11 The FMR cleanup thread runs ib_fmr_batch_release() as dirty entries build up. This commit causes clean but used FMR entries also to be purged. During that process, another thread can see that there are no free FMRs and fail, even though there should always have been enough available. Signed-off-by: Pete Wyckoff <pw@osc.edu> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/fmr_pool: Allocate page list for pool FMRs only when caching enabledOr Gerlitz2008-02-041-2/+5
| | | | | | | | | | Allocate memory for the page_list field of struct ib_pool_fmr only when caching is enabled for the FMR pool, since the field is not used otherwise. This can save significant amounts of memory for large pools with caching turned off. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/fmr_pool: ib_fmr_pool_flush() should flush all dirty FMRsOlaf Kirch2008-01-251-6/+15
| | | | | | | | | | | | | | | | | When a FMR is released via ib_fmr_pool_unmap(), the FMR usually ends up on the free_list rather than the dirty_list (because we allow a certain number of remappings before actually requiring a flush). However, ib_fmr_batch_release() only looks at dirty_list when flushing out old mappings. This means that when ib_fmr_pool_flush() is used to force a flush of the FMR pool, some dirty FMRs that have not reached their maximum remap count will not actually be flushed. Fix this by flushing all FMRs that have been used at least once in ib_fmr_batch_release(). Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/fmr_pool: Flush serial numbers can get out of syncOlaf Kirch2008-01-251-6/+6
| | | | | | | | | | | | | | | | | | | | | Normally, the serial numbers for flush requests and flushes executed for an FMR pool should be in sync. However, if the FMR pool flushes dirty FMRs because the dirty_watermark was reached, we wake up the cleanup thread and let it do its stuff. As a side effect, the cleanup thread increments pool->flush_ser, which leaves it one higher than pool->req_ser. The next time the user calls ib_flush_fmr_pool(), the cleanup thread will be woken up, but ib_flush_fmr_pool() won't wait for the flush to complete because flush_ser is already past req_ser. This means the FMRs that the user expects to be flushed may not have all been flushed when the function returns. Fix this by telling the cleanup thread to do work exclusively by incrementing req_ser, and by moving the comparison of dirty_len and dirty_watermark into ib_fmr_pool_unmap(). Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com>
* IB/fmr_pool: Stop ib_fmr threads from contributing to load averageAnton Blanchard2007-10-301-4/+4
| | | | | | | | | | | I noticed my machine was at a constant load average of 1. This was because ib_create_fmr_pool calls kthread_create but does not immediately wake the thread up. Change to using kthread_run so we enter ib_fmr_cleanup_thread(), set TASK_INTERRUPTIBLE, then go to sleep. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/fmr_pool: Clean up some error messages in fmr_pool.cAnton Blanchard2007-10-091-11/+11
| | | | | | | | | | | A number of printks in fmr_pool.c dont have newlines, eg: fmr_create failed for FMR 0<5>FS-Cache: Loaded Fix them up. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/fmr_pool: Add prefix to all printksRoland Dreier2007-05-061-15/+17
| | | | Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/core: Fix sparse warnings about shadowed declarationsRoland Dreier2007-02-161-2/+2
| | | | | | | Change a couple of variable names to avoid sparse warnings about symbols being shadowed. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB/fmr: ib_flush_fmr_pool() may wait too longRoland Dreier2006-12-121-10/+2
| | | | | | | | | | | | | | | | | | | ib_flush_fmr_pool() stashes away the request generation number properly, but then goes ahead and rereads it every time it tests whether the flush generation number has caught up. This means that there is a theoretical possibility of livelock, if the request generation number keeps getting bumped and the flush generation number never catches up. The fix is simple: use the request generation number read at the beginning of the function. Also, atomic_inc() followed by atomic_read() can be replaced with atomic_int_return(). There's no real requirement for atomicity here but we might as well shrink the code. This bug was discovered using David Binderman's list of "set but never used" warnings from icc. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] fmr pool: remove unnecessary pointer dereferenceMichael S. Tsirkin2006-07-141-4/+4
| | | | | | | | | | | | ib_fmr_pool_map_phys gets the virtual address by pointer but never writes there, and users (e.g. srp) seem to assume this and ignore the value returned. This patch cleans up the API to get the VA by value, and updates all users. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Acked-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* IB/fmr: Use device's max_map_map_per_fmr attribute in FMR pool.Or Gerlitz2006-06-171-3/+27
| | | | | | | | | | When creating a FMR pool, query the IB device and use the returned max_map_map_per_fmr attribute as for the max number of FMR remaps. If the device does not suport querying this attribute, use the original IB_FMR_MAX_REMAPS (32) default. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* IB: Enable FMR pool user to set page sizeOr Gerlitz2006-03-201-3/+3
| | | | | | | | | | This patch allows the consumer to set the page size of "pages" mapped by the pool FMRs, which is a feature already existing in the base verbs API. On the cosmetic side it changes ib_fmr_attr.page_size field to be named page_shift. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB: move include files to include/rdmaRoland Dreier2005-08-261-1/+1
| | | | | | | | Move the InfiniBand headers from drivers/infiniband/include to include/rdma. This allows InfiniBand-using code to live elsewhere, and lets us remove the ugly EXTRA_CFLAGS include path from the InfiniBand Makefiles. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB: unmap FMRs when destroying FMR poolRoland Dreier2005-08-261-0/+6
| | | | | | | | Make sure that all FMRs are unmapped before we deallocate them so that we don't leak references to our protection domain when destroying an FMR pool. (Bug reported by Guy German <guyg@voltaire.com>) Signed-off-by: Roland Dreier <rolandd@cisco.com>
* [PATCH] IB: Update FMR functionsHal Rosenstock2005-07-271-4/+3
| | | | | | | | | | | | Change some functions to return void rather than an int since they are always returning 0, thus making checking return values rather pointless. Signed-off-by: Tom Duffy <tduffy@sun.com> Signed-off-by: Libor Michalek <libor@topspin.com> Signed-off-by: Hal Rosenstock <halr@voltaire.com> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] IB: Trivial FMR printk cleanupLibor Michalek2005-04-161-1/+1
| | | | | | | | | Add missing newline in printk. Signed-off-by: Libor Michalek <libor@topspin.com> Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] IB: Fix FMR pool crashRoland Dreier2005-04-161-3/+2
| | | | | | | | | | Mask bits correctly from jhash result in ib_fmr_hash() so that the computed bucket index is within our hash table. This fixes an SDP crash. Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Linux-2.6.12-rc2Linus Torvalds2005-04-161-0/+507
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!