disable fake_mm when unused (might cause trouble)

This commit is contained in:
Thomas Schoebel-Theuer 2011-11-14 18:24:47 +01:00 committed by Thomas Schoebel-Theuer
parent a861bdf5b7
commit 62786c7d34
3 changed files with 9 additions and 8 deletions

9
mars.h
View File

@ -286,6 +286,8 @@ extern const struct generic_brick_type *_bio_brick_type;
extern const struct generic_brick_type *_aio_brick_type;
extern const struct generic_brick_type *_sio_brick_type;
#ifndef CONFIG_MARS_PREFER_SIO
/* Kludge: our kernel threads will have no mm context, but need one
* for stuff like ioctx_alloc() / aio_setup_ring() etc
* which expect userspace resources.
@ -341,6 +343,13 @@ static inline void unuse_fake_mm(void)
}
}
#else
static inline void set_fake(void) {}
static inline void put_fake(void) {}
static inline void use_fake_mm(void) {}
static inline void unuse_fake_mm(void) {}
#endif
/////////////////////////////////////////////////////////////////////////
// init

View File

@ -226,8 +226,6 @@ int handler_thread(void *data)
wake_up_interruptible(&brick->startup_event);
MARS_DBG("--------------- handler_thread starting on socket %p\n", sock);
//fake_mm();
while (brick->cb_running && !kthread_should_stop()) {
struct mars_cmd cmd = {};
@ -563,8 +561,6 @@ static int _server_thread(void *data)
char *id = my_id();
int status = 0;
//fake_mm();
MARS_INF("-------- server starting on host '%s' ----------\n", id);
while (!kthread_should_stop() &&

View File

@ -992,8 +992,6 @@ int remote_thread(void *data)
real_peer = mars_translate_hostname(peer->peer);
MARS_INF("-------- remote thread starting on peer '%s' (%s)\n", peer->peer, real_peer);
//fake_mm();
status = mars_create_sockaddr(&sockaddr, real_peer);
if (unlikely(status < 0)) {
MARS_ERR("unusable remote address '%s' (%s)\n", real_peer, peer->peer);
@ -3238,8 +3236,6 @@ static int light_thread(void *data)
goto done;
}
//fake_mm();
MARS_INF("-------- starting as host '%s' ----------\n", id);
while (_global.global_power.button || !list_empty(&_global.brick_anchor)) {