Subversion Repositories HelenOS-historic

Rev

Rev 1702 | Rev 1760 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1702 Rev 1757
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
 /** @addtogroup genericmm
29
/** @addtogroup genericmm
30
 * @{
30
 * @{
31
 */
31
 */
32
 
32
 
33
/**
33
/**
34
 * @file
34
 * @file
Line 81... Line 81...
81
 * releases slabs from cpu-shared magazine-list, until at least 1 slab
81
 * releases slabs from cpu-shared magazine-list, until at least 1 slab
82
 * is deallocated in each cache (this algorithm should probably change).
82
 * is deallocated in each cache (this algorithm should probably change).
83
 * The brutal reclaim removes all cached objects, even from CPU-bound
83
 * The brutal reclaim removes all cached objects, even from CPU-bound
84
 * magazines.
84
 * magazines.
85
 *
85
 *
86
 * TODO:@n
86
 * @todo
87
 * For better CPU-scaling the magazine allocation strategy should
87
 * For better CPU-scaling the magazine allocation strategy should
88
 * be extended. Currently, if the cache does not have magazine, it asks
88
 * be extended. Currently, if the cache does not have magazine, it asks
89
 * for non-cpu cached magazine cache to provide one. It might be feasible
89
 * for non-cpu cached magazine cache to provide one. It might be feasible
90
 * to add cpu-cached magazine cache (which would allocate it's magazines
90
 * to add cpu-cached magazine cache (which would allocate it's magazines
91
 * from non-cpu-cached mag. cache). This would provide a nice per-cpu
91
 * from non-cpu-cached mag. cache). This would provide a nice per-cpu
92
 * buffer. The other possibility is to use the per-cache
92
 * buffer. The other possibility is to use the per-cache
93
 * 'empty-magazine-list', which decreases competing for 1 per-system
93
 * 'empty-magazine-list', which decreases competing for 1 per-system
94
 * magazine cache.
94
 * magazine cache.
95
 *
95
 *
-
 
96
 * @todo
96
 * @li it might be good to add granularity of locks even to slab level,
97
 * it might be good to add granularity of locks even to slab level,
97
 *     we could then try_spinlock over all partial slabs and thus improve
98
 * we could then try_spinlock over all partial slabs and thus improve
98
 *     scalability even on slab level
99
 * scalability even on slab level
99
 */
100
 */
100
 
101
 
101
#include <synch/spinlock.h>
102
#include <synch/spinlock.h>
102
#include <mm/slab.h>
103
#include <mm/slab.h>
103
#include <adt/list.h>
104
#include <adt/list.h>
Line 905... Line 906...
905
 
906
 
906
    slab = obj2slab(obj);
907
    slab = obj2slab(obj);
907
    _slab_free(slab->cache, obj, slab);
908
    _slab_free(slab->cache, obj, slab);
908
}
909
}
909
 
910
 
910
 /** @}
911
/** @}
911
 */
912
 */
912
 
-