• Aucun résultat trouvé

8 Future Direction

Dans le document Proceedings of the Linux Symposium (Page 47-50)

Memory reclaim is sure to be a focus area go-ing forward—the difference in access latencies between disk and memory make the decisions about which pages we select to reclaim critical.

We are seeing ever increasing complexity at the architectural level: SMP systems are becoming increasingly large at the high end and increas-ingly common at the desktop, SMT (symmetric multi-threading) and multi-core CPUs are en-tering the market at ever lower prices. All of these place new constraints on memory in rela-tion to memory contenrela-tion and locality which has a knock on effect on memory allocation and thereby memory reclaim. There is already much work in progress looking at these issues.

Promoting Reclaimabilty: work in the alloca-tor to try and group the reclaimable and non-reclaimable allocations with allocations of the same type at various levels. This increases the chance of finding contigious allocations and

when they are not available greatly improves the likelihood of being able to reclaim an ap-propriate area.

Promoting Locality: work is ongoing to better target allocations in NUMA systems when un-der memory pressure. On much NUMA hard-ware the cost of using non-local memory for long running tasks is severe both for the perfor-mance of the affected process and for the sys-tem as a whole. Promoting some reclaim for local allocations even when remote memory is available is being added.

Hotplug: hot-removal of memory requires that we be able to force reclaim the memory which is about to be removed. Work is ongoing to both increase the likelyhood of being able to re-claim the memory and how to handle the case where it cannot be reclaimed thorough remap-ping and relocation.

Targeted Reclaim: memory reclaim currently only comes in the form of general pressure on the memory system. The requirements of hot-plug and others brings a new kind of pressure, pressure over a specific address range. Work is ongoing to see how we can apply address spe-cific pressure both to the normal memory allo-cator and the slab alloallo-cators.

Active Defragmentation: as a last resort, we can re-order pages within the system in order to free up physically contiguous segments to use.

9 Conclusion

As we have shown memory reclaim is a com-plex subject, something of a black art. The cur-rent memory reclaim system is extremely com-plex, one huge heuristic guess. Moreover, it is under pressure from new requirements from big and small iron alike. NUMA architectures

are moving to the desktop. Hotplug memory is becoming the norm for larger machines, and is increasingly important for virtualization. Each of these requirements brings its own issues to what already is a difficult, complex subsystem.

going?

James E.J. Bottomley SteelEye Technology, Inc.

jejb@steeleye.com

Abstract

A transport class is quite simply a device driver helper library with an associated sysfs compo-nent. Although this sounds deceptively simple, in practise it allows fairly large simplifications in device driver code. Up until recently, trans-port classes were restricted to be SCSI only but now they can be made to apply to any de-vice driver at all (including ones with no actual transports).

Subsystems that drive sets of different devices derive the most utility from transport classes.

SCSI is a really good example of this: We have a core set of APIs which are needed by ev-ery SCSI driver (whether Parallel SCSI, Fibre Channel or something even more exotic) to do command queueing and interpret status codes.

However, there were a large number of ancil-lary services which don’t apply to the whole of SCSI, like Domain Validation for Parallel SCSI or target disconnection/reconnection for Fibre Channel. Exposing parameters (like period and offset, for parallel SCSI) via sysfsgives the user a well known way to control them with-out having to develop a core SCSI API. Since a transport class has only asysfsinterface and a driver API it is completely independent of the SCSI core. This makes the classes arbitrarily extensible and imposes no limit on how many may be simultaneously present.

This paper will examine the evolution of the transport class in SCSI, covering its current uses in Parallel SCSI (SPI), Fibre Channel (FC) and other transports (iSCSI and SAS), contrast-ing it with previous approaches, like CAM, and follow with a description of how the concept was freed from the SCSI subsystem and how it could be applied in other aspects of kernel de-velopment, particularly block devices.

1 Introduction

Back in 1986, when the T10 committee first came out with the Small Computer Systems In-terconnect (SCSI) protocol, it was designed to run on a single 8 bit parallel bus. A later proto-col revision: SCSI-2 [1] was released in 1993 which added the ability to double the bus width and do synchronous data transfers at speeds up to 10MHz. Finally, in 1995, the next gener-ation SCSI-3 architecture [5] was introduced.

This latest standard is a constantly evolving system which includes different transports (like serial attached SCSI and Fibre Channel) and enhances the existing parallel SCSI infrastruc-ture up to Ultra360.

• 41 •

Dans le document Proceedings of the Linux Symposium (Page 47-50)