On compactness in locally convex spaces