aboutsummaryrefslogblamecommitdiffstats
path: root/arch/ia64/Kconfig.debug
blob: de9d507ba0fd466d8b466f54d1143a46d20caaa0 (plain) (tree)































































                                                                                        
menu "Kernel hacking"

source "lib/Kconfig.debug"

choice
	prompt "Physical memory granularity"
	default IA64_GRANULE_64MB

config IA64_GRANULE_16MB
	bool "16MB"
	help
	  IA-64 identity-mapped regions use a large page size called "granules".

	  Select "16MB" for a small granule size.
	  Select "64MB" for a large granule size.  This is the current default.

config IA64_GRANULE_64MB
	bool "64MB"
	depends on !(IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_SGI_SN2)

endchoice

config IA64_PRINT_HAZARDS
	bool "Print possible IA-64 dependency violations to console"
	depends on DEBUG_KERNEL
	help
	  Selecting this option prints more information for Illegal Dependency
	  Faults, that is, for Read-after-Write (RAW), Write-after-Write (WAW),
	  or Write-after-Read (WAR) violations.  This option is ignored if you
	  are compiling for an Itanium A step processor
	  (CONFIG_ITANIUM_ASTEP_SPECIFIC).  If you're unsure, select Y.

config DISABLE_VHPT
	bool "Disable VHPT"
	depends on DEBUG_KERNEL
	help
	  The Virtual Hash Page Table (VHPT) enhances virtual address
	  translation performance.  Normally you want the VHPT active but you
	  can select this option to disable the VHPT for debugging.  If you're
	  unsure, answer N.

config IA64_DEBUG_CMPXCHG
	bool "Turn on compare-and-exchange bug checking (slow!)"
	depends on DEBUG_KERNEL
	help
	  Selecting this option turns on bug checking for the IA-64
	  compare-and-exchange instructions.  This is slow!  Itaniums
	  from step B3 or later don't have this problem. If you're unsure,
	  select N.

config IA64_DEBUG_IRQ
	bool "Turn on irq debug checks (slow!)"
	depends on DEBUG_KERNEL
	help
	  Selecting this option turns on bug checking for the IA-64 irq_save
	  and restore instructions.  It's useful for tracking down spinlock
	  problems, but slow!  If you're unsure, select N.

config SYSVIPC_COMPAT
	bool
	depends on COMPAT && SYSVIPC
	default y

endmenu
class='sha1'>1da177e4c3f4
c922d5f7f545
1da177e4c3f4






c922d5f7f545
1da177e4c3f4








c922d5f7f545
02ab823fd1a2
1da177e4c3f4































72d9486169a2
1da177e4c3f4
72d9486169a2
1da177e4c3f4








0cd3312434cd
1da177e4c3f4







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217










                                                             

                                



                             

                                             




                                                                   
                             

























































                                                                          
                                                                    
























                                                                           
                                                                      




























                                                                         
                                                  



                 
                                                                     






                                                             
                                                                         








                                                             
                                                               
                                                                              































                                                                             
                                               
 
                                       








                                                    
                                                 







                                                                   
/*
 * Copyright (C) 2003 Sistina Software.
 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
 *
 * Module Author: Heinz Mauelshagen
 *
 * This file is released under the GPL.
 *
 * Round-robin path selector.
 */

#include <linux/device-mapper.h>

#include "dm-path-selector.h"

#include <linux/slab.h>

#define DM_MSG_PREFIX "multipath round-robin"

/*-----------------------------------------------------------------
 * Path-handling code, paths are held in lists
 *---------------------------------------------------------------*/
struct path_info {
	struct list_head list;
	struct dm_path *path;
	unsigned repeat_count;
};

static void free_paths(struct list_head *paths)
{
	struct path_info *pi, *next;

	list_for_each_entry_safe(pi, next, paths, list) {
		list_del(&pi->list);
		kfree(pi);
	}
}

/*-----------------------------------------------------------------
 * Round-robin selector
 *---------------------------------------------------------------*/

#define RR_MIN_IO		1000

struct selector {
	struct list_head valid_paths;
	struct list_head invalid_paths;
};

static struct selector *alloc_selector(void)
{
	struct selector *s = kmalloc(sizeof(*s), GFP_KERNEL);

	if (s) {
		INIT_LIST_HEAD(&s->valid_paths);
		INIT_LIST_HEAD(&s->invalid_paths);
	}

	return s;
}

static int rr_create(struct path_selector *ps, unsigned argc, char **argv)
{
	struct selector *s;

	s = alloc_selector();
	if (!s)
		return -ENOMEM;

	ps->context = s;
	return 0;
}

static void rr_destroy(struct path_selector *ps)
{
	struct selector *s = (struct selector *) ps->context;

	free_paths(&s->valid_paths);
	free_paths(&s->invalid_paths);
	kfree(s);
	ps->context = NULL;
}

static int rr_status(struct path_selector *ps, struct dm_path *path,
		     status_type_t type, char *result, unsigned int maxlen)
{
	struct path_info *pi;
	int sz = 0;

	if (!path)
		DMEMIT("0 ");
	else {
		switch(type) {
		case STATUSTYPE_INFO:
			break;
		case STATUSTYPE_TABLE:
			pi = path->pscontext;
			DMEMIT("%u ", pi->repeat_count);
			break;
		}
	}

	return sz;
}

/*
 * Called during initialisation to register each path with an
 * optional repeat_count.
 */
static int rr_add_path(struct path_selector *ps, struct dm_path *path,
		       int argc, char **argv, char **error)
{
	struct selector *s = (struct selector *) ps->context;
	struct path_info *pi;
	unsigned repeat_count = RR_MIN_IO;

	if (argc > 1) {
		*error = "round-robin ps: incorrect number of arguments";
		return -EINVAL;
	}

	/* First path argument is number of I/Os before switching path */
	if ((argc == 1) && (sscanf(argv[0], "%u", &repeat_count) != 1)) {
		*error = "round-robin ps: invalid repeat count";
		return -EINVAL;
	}

	/* allocate the path */
	pi = kmalloc(sizeof(*pi), GFP_KERNEL);
	if (!pi) {
		*error = "round-robin ps: Error allocating path context";
		return -ENOMEM;
	}

	pi->path = path;
	pi->repeat_count = repeat_count;

	path->pscontext = pi;

	list_add_tail(&pi->list, &s->valid_paths);

	return 0;
}

static void rr_fail_path(struct path_selector *ps, struct dm_path *p)
{
	struct selector *s = (struct selector *) ps->context;
	struct path_info *pi = p->pscontext;

	list_move(&pi->list, &s->invalid_paths);
}

static int rr_reinstate_path(struct path_selector *ps, struct dm_path *p)
{
	struct selector *s = (struct selector *) ps->context;
	struct path_info *pi = p->pscontext;

	list_move(&pi->list, &s->valid_paths);

	return 0;
}

static struct dm_path *rr_select_path(struct path_selector *ps,
				      unsigned *repeat_count, size_t nr_bytes)
{
	struct selector *s = (struct selector *) ps->context;
	struct path_info *pi = NULL;

	if (!list_empty(&s->valid_paths)) {
		pi = list_entry(s->valid_paths.next, struct path_info, list);
		list_move_tail(&pi->list, &s->valid_paths);
		*repeat_count = pi->repeat_count;
	}

	return pi ? pi->path : NULL;
}

static struct path_selector_type rr_ps = {
	.name = "round-robin",
	.module = THIS_MODULE,
	.table_args = 1,
	.info_args = 0,
	.create = rr_create,
	.destroy = rr_destroy,
	.status = rr_status,
	.add_path = rr_add_path,
	.fail_path = rr_fail_path,
	.reinstate_path = rr_reinstate_path,
	.select_path = rr_select_path,
};

static int __init dm_rr_init(void)
{
	int r = dm_register_path_selector(&rr_ps);

	if (r < 0)
		DMERR("register failed %d", r);

	DMINFO("version 1.0.0 loaded");

	return r;
}

static void __exit dm_rr_exit(void)
{
	int r = dm_unregister_path_selector(&rr_ps);

	if (r < 0)
		DMERR("unregister failed %d", r);
}

module_init(dm_rr_init);
module_exit(dm_rr_exit);

MODULE_DESCRIPTION(DM_NAME " round-robin multipath path selector");
MODULE_AUTHOR("Sistina Software <dm-devel@redhat.com>");
MODULE_LICENSE("GPL");